| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // A part of the dart:math library. | 5 // A part of the dart:math library. |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A random number generator. The default implementation supplies a stream of | 8 * A random number generator. The default implementation supplies a stream of |
| 9 * pseudo-random bits which is not suitable for cryptographic purposes. | 9 * pseudo-random bits which is not suitable for cryptographic purposes. |
| 10 */ | 10 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 /** | 21 /** |
| 22 * Generates a positive random integer uniformly distributed on the range | 22 * Generates a positive random integer uniformly distributed on the range |
| 23 * from 0, inclusive, to [max], exclusive. | 23 * from 0, inclusive, to [max], exclusive. |
| 24 * | 24 * |
| 25 * Implementation note: The default implementation supports [max] values | 25 * Implementation note: The default implementation supports [max] values |
| 26 * between 1 and ((1<<32) - 1) inclusive. | 26 * between 1 and ((1<<32) - 1) inclusive. |
| 27 */ | 27 */ |
| 28 abstract int nextInt(int max); | 28 abstract int nextInt(int max); |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Generates a positive random integer uniformly distributed on the range |
| 32 * from [min], inclusive, to [max], exclusive. |
| 33 * |
| 34 * Implementation note: The default implementation supports [max] values |
| 35 * between 1 and ((1<<32) - 1) inclusive. [min] must be greater then 0 |
| 36 * and strictly less then [max]. |
| 37 */ |
| 38 abstract int nextIntRange(int min, int max); |
| 39 |
| 40 /** |
| 31 * Generates a positive random floating point value uniformly distributed on | 41 * Generates a positive random floating point value uniformly distributed on |
| 32 * the range from 0.0, inclusive, to 1.0, exclusive. | 42 * the range from 0.0, inclusive, to 1.0, exclusive. |
| 33 */ | 43 */ |
| 34 abstract double nextDouble(); | 44 abstract double nextDouble(); |
| 35 | 45 |
| 36 /** | 46 /** |
| 37 * Generates a random boolean value. | 47 * Generates a random boolean value. |
| 38 */ | 48 */ |
| 39 abstract bool nextBool(); | 49 abstract bool nextBool(); |
| 40 } | 50 } |
| OLD | NEW |