code/__DEFINES/_math.dm

get_turf | Get the turf that A resides in, regardless of any containers. |
---|---|
SIGN | Gets the sign of x, returns -1 if negative, 0 if 0, 1 if positive |
LERP | Performs a linear interpolation between a and b. Note that amount=0 returns a, amount=1 returns b, and amount=0.5 returns the mean of a and b. |
Define Details
LERP
Performs a linear interpolation between a and b. Note that amount=0 returns a, amount=1 returns b, and amount=0.5 returns the mean of a and b.
SIGN
Gets the sign of x, returns -1 if negative, 0 if 0, 1 if positive
get_turf
Get the turf that A
resides in, regardless of any containers.
Use in favor of A.loc
or src.loc
so that things work correctly when
stored inside an inventory, locker, or other container.