get the absolute positive value of a number.
this function is faster than Math.abs as it uses the ternary conditional operator, which makes it highly JIT optimized.
Math.abs
the reason why we don't call this function abs is because one such function already exists in the numericarray submodule (abs).
abs
get the absolute positive value of a number.
this function is faster than
Math.abs
as it uses the ternary conditional operator, which makes it highly JIT optimized.the reason why we don't call this function
abs
is because one such function already exists in the numericarray submodule (abs).