All Functions Modules Pages
math

Functions

NUMBER math.map (NUMBER in_value, NUMBER in_min, NUMBER in_max, NUMBER out_min, NUMBER out_max)
 Re-assign a number from one range to another. More...
 
NUMBER math.minmax (NUMBER x, NUMBER min, NUMBER max)
 Keeps a number between two limits. More...
 
NUMBER math.bitnot (NUMBER Bit)
 Performs a bit logical negation (the 1 is converted to 0, and vice versa). More...
 
NUMBER math.bitand (NUMBER one, NUMBER two)
 Performs a logic AND operation on each bit pair. More...
 
NUMBER math.bitor (NUMBER one, NUMBER two)
 Performs a logic OR operation on each bit pair. More...
 

Detailed Description

Math functions

Function Documentation

NUMBER math.map ( NUMBER  in_value,
NUMBER  in_min,
NUMBER  in_max,
NUMBER  out_min,
NUMBER  out_max 
)

Re-assign a number from one range to another.

Parameters
in_valueThe incoming value.
in_minThe minimum incoming value.
in_maxThe maximum incoming value.
out_minThe minimum value outgoing.
out_maxThe maximum outgoing value.
Returns
The incoming value, transformed according to the new range.
NUMBER math.minmax ( NUMBER  x,
NUMBER  min,
NUMBER  max 
)

Keeps a number between two limits.

Parameters
xThe number to evaluate.
minLower limit.
maxUpper limit.
Returns
If x is greater than max, returns max. If x is less than min, returns min. If x is greater than min and less than max, returns x.
NUMBER math.bitnot ( NUMBER  Bit)

Performs a bit logical negation (the 1 is converted to 0, and vice versa).

Parameters
BitThe number to process.
Returns
The number with operation applied.
NUMBER math.bitand ( NUMBER  one,
NUMBER  two 
)

Performs a logic AND operation on each bit pair.

Parameters
oneFirst number to process.
twoSecond number to process.
Returns
The number with operation applied.
NUMBER math.bitor ( NUMBER  one,
NUMBER  two 
)

Performs a logic OR operation on each bit pair.

Parameters
oneFirst number to process.
twoSecond number to process.
Returns
The number with operation applied.