Module globalscope

Module globalscope 

Source

Functions§

cartesian2polar
Coordinate system conversion: cartesian -> polar
db2linear
Converts from decibels to linear energy (audio).
ease
Returns an “eased” value of x based on an easing function defined with curve.
fposmod
Returns the floating-point modulus of a/b that wraps equally in positive and negative.
inverse_lerp
Find linear interpolation weight from interpolated values.
is_equal_approx
Returns true if a and b are approximately equal to each other.
is_zero_approx
Returns true if s is zero or almost zero.
lerp
Linearly interpolates between two values, by the factor defined in weight.
lerp_angle
Linearly interpolates between two angles (in radians), by a normalized value.
linear2db
Converts from linear energy to decibels (audio).
move_toward
Moves range.start() toward range.end() by the delta value.
nearest_po2
Returns the nearest equal or larger power of 2 for an integer value.
polar2cartesian
Coordinate system conversion: polar -> cartesian
posmod
Returns the integer modulus of a/b that wraps equally in positive and negative.
range_lerp
Maps a value from range_from to range_to, using linear interpolation.
smoothstep
Smooth (Hermite) interpolation.
step_decimals
Position of the first non-zero digit, after the decimal point.
stepify
Snaps float value s to a given step.
wrapf
Wraps float value between min and max.
wrapi
Wraps integer value between min and max.