Skip to content
Reference > Methods

rand()

Definition

Double rand()

Description

Returns a random Double between 0.0 (inclusive) and 1.0 (exclusive), Note: this random is not secure.

Examples

1
2
3
Double r1 = rand(); // r1 == 0.5676686163569893
Double r2 = rand(); // r2 == 0.5228082275850394
Double r3 = rand(); // r3 == 0.6024392237854733