Abs()

Syntax

Result.f = Abs(Number.f)
Description
Returns the absolute value of the given float value.

Parameters

Number.f The number from which to get the absolute value. This function will only work correctly with float numbers. With integers, it will fail if the integer is too large (due to a loss of precision).

Return value

Returns the absolute value. The return-value is always positive.

Remarks

This function can handle float and double values.

Example

  Debug Abs(3.14159)  ; Will display '3.14159'
  Debug Abs(-3.14159) ; will display '3.14159'

See Also

Sign()

Supported OS

All

<- ATanH() - Math Index - Cos() ->