Methods
Static nextDouble
- nextDouble(min: number, max?: number): number
-
Parameters
-
min: number
-
Default value max: number = null
Returns number
a random double value.
Static updateDouble
- updateDouble(value: number, range?: number): number
-
Parameters
-
value: number
-
Default value range: number = null
Returns number
Random generator for double values.
Example
let value1 = RandomDouble.nextDouble(5, 10); // Possible result: 7.3 let value2 = RandomDouble.nextDouble(10); // Possible result: 3.7 let value3 = RandomDouble.updateDouble(10, 3); // Possible result: 9.2