Num

Home

Num is a static class that contains functions that modify or analyze number values.

Static Functions

Num.avg(a: Array<number>): number Returns the average value of the set of numbers in the given array.
Num.byteToFloat(b3: number, b2: number, b1: number, b0: numbe): number Returns the float number represented by the 4 given byte values.
Num.constrain(val: number, low: number, high: number): number Returns the given number constrained to the range [low, high].
Num.deg(rad: number): number Returns the degree value of the given angle in radians.
Num.getSign(a: number): number Returns -1 if the number is less that 0 or 1 if the number is greater or equal to 0.
Num.rad(deg: number): number Returns the radian value of the given angle in degrees.

Home

Copyright © 2020 Trevor Richard