mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-04-21 16:01:56 +02:00
Merge pull request #1790 from pimjansen/feature/floor-int-cast
Floor is not always returning an int
This commit is contained in:
commit
37f93702ce
@ -26,7 +26,7 @@ class Biased extends Base
|
||||
$y = mt_rand() / (mt_getrandmax() + 1);
|
||||
} while (call_user_func($function, $x) < $y);
|
||||
|
||||
return floor($x * ($max - $min + 1) + $min);
|
||||
return (int) floor($x * ($max - $min + 1) + $min);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user