modules/number/main library

Properties

r Random
getter/setter pair

Functions

clamp(num number, num? lower, [num? upper]) → dynamic
Clamps number within the inclusive lower and upper bounds.
inRange(num number, num? start, [num? end]) → dynamic
Checks if n is between start and up to, but not including, end. If end is not specified, it's set to start with start then set to 0. If start is greater than end the params are swapped to support negative ranges.
random(num upper, {num? lower, bool floating = false}) → dynamic