Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: corelib/unified/math/random.dart

Issue 10831324: Cleanup of math sources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Another attempt Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « corelib/unified/math/math_sources.gypi ('k') | lib/compiler/implementation/lib/coreimpl.dartp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // A part of the dart:math library.
6
7 /**
8 * A random number generator. The default implementation supplies a stream of
9 * pseudo-random bits which is not suitable for cryptographic purposes.
10 */
11 class Random {
12 /**
13 * Creates a random-number generator. The optional parameter [seed] is used
14 * to initialize the internal state of the generator. The implementation of
15 * the random stream can change between releases of the library.
16 *
17 * Implementation note: The default implementation uses up to 64-bits of seed.
18 */
19 external factory Random([int seed]);
20
21 /**
22 * Generates a positive random integer uniformly distributed on the range
23 * from 0, inclusive, to [max], exclusive.
24 *
25 * Implementation note: The default implementation supports [max] values
26 * between 1 and ((1<<32) - 1) inclusive.
27 */
28 abstract int nextInt(int max);
29
30 /**
31 * Generates a positive random floating point value uniformly distributed on
32 * the range from 0.0, inclusive, to 1.0, exclusive.
33 */
34 abstract double nextDouble();
35
36 /**
37 * Generates a random boolean value.
38 */
39 abstract bool nextBool();
40 }
OLDNEW
« no previous file with comments | « corelib/unified/math/math_sources.gypi ('k') | lib/compiler/implementation/lib/coreimpl.dartp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698