Error message returned when calling random
before it has been initialized
clamp will automatically flip minimum and maximum if minimum is greater than maximum
number to clamp
minimum value
maximum value
Create a seeded random
function
Random seed
seeded random
function
Find if an unknown value is within a Typescript safe "union" values array
Value to test
"Union" values array
found value if found
Initialize module instance-wide random
function
Random seed
Module instance-wide random
function
Test if an unknown value is within a Typescript safe "union" values array
Value to test
"Union" values array
true if value is valid, otherwise false
Linear interpolate a percent between two values
amount to interpolate between 0 and 1
start of range to interpolate
end of range to interpolate
Map a value from one range to another
value to map from original range
start of original range
end of original range
start of range to map to
end of range to map to
Generate a random number
optionally overridable random
function, if void
falls back to the module instance-wide random
function
Randomly generated number
Generate a random boolean value
optionally overridable random
function, if void
falls back to the module instance-wide random
function
Randomly generated boolean value
Return a random index valid for the provided array
Array to return index from
optionally overridable random
function, if void
falls back to the module instance-wide random
function
Valid random index
Generate a random string
minimum length of returned string, defaults to 0
maximum length of returned string, defaults to 2^15
(what seems to be a safe value for browsers)
optional set of characters to select from randomly
optionally overridable random
function, if void
falls back to the module instance-wide random
function
Randomly generated string
Return a random value for the provided array
Array to return value from
optionally overridable random
function, if void
falls back to the module instance-wide random
function
Random value from the provided array
Generated using TypeDoc
Random function signature