# Math

An NQC library providing some basic math functions.

## math-compare.nqh

### Min(int &returnValue, int x, int y)

Returns the smaller of the two provided values.

### Max(int &returnValue, int x, int y)

Returns the larger of the two provided values.

### Range(int &returnValue, int input, int min, int max)

If input is outside the min/max range, return min or max as appropriate.

## math-trig.nqh

### UnwrapAngle(int &angle)

Given an angle outside 0-360 degrees, move it back into range.

### Cosine(int &returnValue, int angle)

Simple cosine table.

Website

- Original
- Archived