Skip to content

Commit 6c6a8c4

Browse files
committed
update to example
1 parent 2451b3e commit 6c6a8c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sdk/lib/math/random.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ part of dart.math;
1414
/// To create a non-negative random integer uniformly distributed in the range
1515
/// from 0, inclusive, to [max], exclusive, use [nextInt(int max)].
1616
/// ```dart
17-
/// var value = Random().nextInt(10); // Value between 0 - 9.
18-
/// value = Random().nextInt(100) + 50; // Value between 50 - 149
17+
/// var intValue = Random().nextInt(10); // Value between 0 - 9.
18+
/// intValue = Random().nextInt(100) + 50; // Value between 50 - 149
1919
/// ```
2020
/// To create a non-negative random floating point value uniformly distributed
2121
/// in the range from 0.0, inclusive, to 1.0, exclusive, use [nextDouble].
2222
/// ```dart continued
23-
/// value = Random().nextDouble(); // Value between 0.0 - 1.0.
24-
/// value = Random().nextDouble() + 10; // Value is >= 10.0 and < 11.0
23+
/// var doubleValue = Random().nextDouble(); // Value between 0.0 - 1.0.
24+
/// doubleValue = Random().nextDouble() + 10; // Value is >= 10.0 and < 11.0
2525
/// ```
2626
/// To create a random boolean value, use [nextBool].
2727
/// ```dart continued
28-
/// value = Random().nextBool(); // Value is true or false.
28+
/// var boolValue = Random().nextBool(); // Value is true or false.
2929
/// ```
3030
abstract class Random {
3131
/// Creates a random number generator.

0 commit comments

Comments
 (0)