Math.abs

Math.abs

Math.abs

Function

Absolute value. Returns the absolute value of value.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
valueNumberYesNoneThe number involved in the calculation.

Return value

TypeDescription
Int/FloatReturns the absolute value of value. An Int is returned for integer results, and a Float for non-integer or non-finite results.

Example

Notes

  • Parameters are converted to f64 according to BT relaxed number rules.