RandomNumberGenerator

Inherits: Reference < Object

Category: Core

Brief Description

A class for generation pseudo-random numbers.

Properties

int seed

Methods

float randf ( )
float randf_range ( float from, float to )
int randi ( )
int randi_range ( int from, int to )
void randomize ( )

Property Descriptions

Setter set_seed(value)
Getter get_seed()

Method Descriptions

Generates pseudo-random float between ‘0.0’ and ‘1.0’.

Generates pseudo-random float between from and to.

  • int randi ( )

Generates pseudo-random 32-bit unsigned integer between ‘0’ and ‘4294967295’.

Generates pseudo-random 32-bit signed integer between from and to(inclusive).

  • void randomize ( )

Setups a time-based seed to generator.