2018-12-29 16:05:19 -08:00
|
|
|
# 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 of `n`.)
|
|
|
|
|
|
|
|
- `ATan2`
|
|
|
|
|
2019-02-02 18:06:35 -08:00
|
|
|
Computes the arctangent of `y / x` using the arguments' signs to determine
|
|
|
|
the correct quadrant.
|
2018-12-29 16:05:19 -08:00
|
|
|
|
|
|
|
- `BAM`
|
|
|
|
|
|
|
|
Returns a byte angle of `angle` (`degrees * (0x40000000 / 90.0)`.)
|
|
|
|
|
|
|
|
- `Clamp`
|
|
|
|
|
2019-02-02 18:06:35 -08:00
|
|
|
Returns `n` if `n` is more than `minimum` and less than `maximum`, or either
|
|
|
|
of those values if it is not.
|
2018-12-29 16:05:19 -08:00
|
|
|
|
|
|
|
- `Max`
|
|
|
|
|
|
|
|
Returns `n` if `n` is less than `maximum`, or `maximum`.
|
|
|
|
|
|
|
|
- `Min`
|
|
|
|
|
|
|
|
Returns `n` if `n` is more than `minimum`, or `minimum`.
|
|
|
|
|
|
|
|
- `VectorAngle`
|
|
|
|
|
|
|
|
Same as `ATan2`, but with arguments reversed.
|
|
|
|
|
|
|
|
<!-- EOF -->
|