Random.nextInt(int max) could be optional #5362
Labels
area-library
closed-not-planned
Closed as we don't intend to take action on the reported issue
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by @financecoding
Mentions default implementation supports a max of ((1<<32) - 1), why not make the parameter optional?
abstract int nextInt([int max]);
/**
* Generates a positive random integer uniformly distributed on the range
* from 0, inclusive, to [max], exclusive.
*
* Implementation note: The default implementation supports [max] values
* between 1 and ((1<<32) - 1) inclusive.
*/
abstract int nextInt(int max);
https://github.com/dart-lang/bleeding_edge/blob/master/dart/lib/math/random.dart#L28
The text was updated successfully, but these errors were encountered: