mirror of https://github.com/marrub--/zscript-doc
847 B
847 B
Math
TODO
Type Abs(Type n);
double ATan2(double y, double x);
uint BAM(double angle);
Type Clamp(Type n, Type minimum, Type maximum);
Type Max(Type n, Type maximum);
Type Min(Type n, Type minimum);
double VectorAngle(double x, double y);
-
Abs
Returns
|n|
(absolute ofn
.) -
ATan2
Computes the arctangent of
y / x
using the arguments' signs to determine the correct quadrant. -
BAM
Returns a byte angle of
angle
(degrees * (0x40000000 / 90.0)
.) -
Clamp
Returns
n
ifn
is more thanminimum
and less thanmaximum
, or either of those values if it is not. -
Max
Returns
n
ifn
is less thanmaximum
, ormaximum
. -
Min
Returns
n
ifn
is more thanminimum
, orminimum
. -
VectorAngle
Same as
ATan2
, but with arguments reversed.