math
random_int( min, max ): int
Returns a random integer between the two given numbers
Type
Name
Description
int
min
The minimum number that can be generated
int
max
The maximum number that can be generated
print( math.random_int( 5, 10 ) );
random_float( min, max ): float
Returns a random float between the two given numbers
Type
Name
Description
float
min
The minimum number that can be generated
float
max
The maximum number that can be generated
print( math.random_float( 3.25, 9.92 ) );
ticks_to_time( ticks ): float
Converts game ticks into time
Type
Name
Description
int
ticks
The amount of game ticks to convert to time
print( math.ticks_to_time( 64 ) );
time_to_ticks( time ): int
Converts time into game ticks
Type
Name
Description
float
time
The amount of time to convert to game ticks
print( math.time_to_ticks( 1.0 ) );
Last updated
Was this helpful?