Skip to content

random

Source: ./random.scar

Functions

uuid

uuid(int length) -> char*

Get a random UUID.

num

num(int x, int y) -> int

Get a random number.

Returns an integer between x and y, inclusive.

boolean

boolean() -> bool

Random boolean value.

Returns true or false with equal probability.

floatb

floatb() -> float

Random float between 0.0 and 1.0

float_range

float_range(float x, float y) -> float

Random float between x and y