element-wise math ¶
The element-wise math functions apply one Luau math function to every value in
an ndArray<number> and return the result as a new ndArray<number>.
Supported functions¶
The following wrappers are available:
abs, acos, asin, atan, ceil, cos, cosh, deg, exp, floor,
log, log10, modf, rad, round, sign, sin, sinh, sqrt, tan,
and tanh.
log2 is also available and applies math.log(value, 2) to each item.
Parameters¶
Array : ndArray <number>
The numeric array the function is applied to.
Returns -> ndArray <number>
A new ndArray<number> containing the element-wise result. The input array is
copied before values are transformed.