Random()Method : JMath
Generates a pseudo-random number between a minimum and maximum value
Values
function Random(min?: Number, max?: Number, decimals?: boolean): Number|float
Parameters
- min
- The minimum value of the generated output.
- Defaults to 0.
- max
- The maximum value of the generated output.
- Defaults to 9.
- decimals
- Determines whether or not the method can return a float.
- Defaults to false.
Returns
Common Errors
Example
console.log(JMath.Random(4, 39)); // Could return: 23 console.log(JMath.Random(5, 10, true)); // Could return: 7.66666666
Log
JMAC c | 22-05-25
Method introduced.
JMAC g_a | 02-07-25
Method converted to Cast structure as test phase.
JMAC 1a | 02-09-25
Method reverted to normal structure.
Error fixes.