Namespace: DuMath

DuMath

Math related methods

Methods

staticDuMath.average(values){float}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5101
Calculates the average value in a list
Name Type Description
values Number | Array.<Number> values
Returns:
Type Description
float The average value

staticDuMath.clamp(values, min, max){Number|Array.<Number>}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5122
Clamps the value
Name Type Default Description
values Number | Array.<Number> values
min Number 0 optional The minimum value
max Number 1 optional The maximum value
Returns:
Type Description
Number | Array.<Number> The clamped values

staticDuMath.equals(value1, value2, floatPrecision){boolean}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5069
Compares two numbers
Name Type Default Description
value1 Number The first value
value2 Number The second value
floatPrecision int -1 optional The precision for (float) number comparison, number of decimals. Set to -1 to not use.
Returns:
Type Description
boolean true if the two values are equal

staticDuMath.length(value1, value2){float}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5042
Measures the vector length between two points
Name Type Description
value1 Array.<int> The first value
value2 Array.<int> The second value
Returns:
Type Description
float The length

staticDuMath.log10(w){float}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5090
Calculates the log10 of a number
Name Type Description
w float The number
Returns:
Type Description
float The result of log10(x)
i.e. Math.log(x)/Math.LN10

staticDuMath.random(min, max){int}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5022
Generates a random integer between minimum and maximum
Name Type Default Description
min int 0 optional The minimum value
max int 1 optional The maximum value
Returns:
Type Description
int The randomly generated integer

staticDuMath.toDegrees(value){float}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5161
Converts the number from radians to degrees
Name Type Description
value number the value
Returns:
Type Description
float The value in degrees

staticDuMath.toRadians(value){float}

D:/DEV_SRC/RxOT/DuAEF/DuESF/tools/build/output/DuESF.jsxinc, line 5150
Converts the number from degrees to radians
Name Type Description
value number the value
Returns:
Type Description
float The value in radians