MathLib.random returns a pseudorandom value between 0.0 and 1.0, inclusive. The repeated invocation of the function gives an approximately uniform distribution of numbers in that range.
eglx.lang
static function random() returns (float);
After the following code runs, the value of result is a floating point number:
result Float = MathLib.random();
In the case of Java™, EGL uses methods in the Java StrictMath class that are equivalent to the EGL functions. This usage ensures that the runtime behavior is the same for every Java Virtual Machine.
| Target | Issue |
|---|---|
| Java | No issues. |
| JavaScript | No issues. |