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 part of dart.math; | 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 */ |
11 class Random { | 11 class Random { |
12 /** | 12 /** |
13 * Creates a random-number generator. The optional parameter [seed] is used | 13 * Creates a random-number generator. The optional parameter [seed] is used |
14 * to initialize the internal state of the generator. The implementation of | 14 * to initialize the internal state of the generator. The implementation of |
15 * the random stream can change between releases of the library. | 15 * the random stream can change between releases of the library. |
(...skipping 15 matching lines...) Expand all Loading... |
31 * Generates a positive random floating point value uniformly distributed on | 31 * Generates a positive random floating point value uniformly distributed on |
32 * the range from 0.0, inclusive, to 1.0, exclusive. | 32 * the range from 0.0, inclusive, to 1.0, exclusive. |
33 */ | 33 */ |
34 double nextDouble(); | 34 double nextDouble(); |
35 | 35 |
36 /** | 36 /** |
37 * Generates a random boolean value. | 37 * Generates a random boolean value. |
38 */ | 38 */ |
39 bool nextBool(); | 39 bool nextBool(); |
40 } | 40 } |
OLD | NEW |