Class Math
Version added: 14.4
NOTE: All methods and properties of this class are static (which means they can be used without creating an instance of the class).
For example:
For example:
local remainder = LM.Math:Mod(20, 8)Methods of Math:
| Name | Returns | Description | Ver |
| AnglesEquivalent AnglesEquivalent(a1, a2, threshold) | bool | Added in version 14.4 | 14.4 |
| AngleSign AngleSign(angle) | int32 | Returns 1 or -1, taking into account angles over 180 or under -180 | 14.4 |
| Cerp Cerp(percent, min, max, norm1, norm2) | real | Added in version 14.4 | 14.4 |
| Mod Mod(x, n) | int32 | Modulo operation that works for both positive and negative numbers | 14.4 |
| Noise Noise(pos, amp, freq) | real | Added in version 14.4 | 14.4 |
| NoiseVector NoiseVector(pos, amp, freq) | Vector3 | Added in version 14.4 | 14.4 |
| NoiseVector2D NoiseVector2D(pos, amp, freq, randSeed) | Vector2 | Added in version 14.4 | 14.4 |
| NormalizeAngle NormalizeAngle(a) | real | Returns an equivalent angle in the range 0 to 2PI | 14.4 |
| RealEqual RealEqual(r1, r2, threshold) | bool | Added in version 14.4 | 14.4 |
| RealEqual64 RealEqual64(r1, r2, threshhold) | bool | Added in version 14.4 | 14.4 |
| Slerp Slerp(percent, min, max) | real | Added in version 14.4 | 14.4 |
| SplineInterp SplineInterp(xVal, min, inA, inB, max) | real | Added in version 14.4 | 14.4 |
| SplineInterp2 SplineInterp2(xVal, preVal, min, max, postVal) | real | Added in version 14.4 | 14.4 |
| SplineInterp3 SplineInterp3(xVal, preVal, min, max, postVal) | real | Added in version 14.4 | 14.4 |
| SplineInterp4 SplineInterp4(xVal, preVal, min, max, postVal) | real | Added in version 14.4 | 14.4 |
| Turbulence Turbulence(pos, amp, scale) | real | Added in version 14.4 | 14.4 |
| TurbulenceVector TurbulenceVector(pos, amp, scale) | Vector3 | Added in version 14.4 | 14.4 |
| TurbulenceVector2D TurbulenceVector2D(pos, amp, scale, randSeed) | Vector2 | Added in version 14.4 | 14.4 |