floatabs()

floatabs()

Description

Return the absolute value of a floating point number

Syntax

floatabs(value);

Parameters

Variable

Input

Variable

Input

value

Input value

Returns

The absolute value of the parameter.

Function call example

Example of float type numbers absolute value
new Float:dist; new Float:abs; main() { dist = Float:get_val(Sensor_Distance); abs = floatabs(dist); //absolute value result is |dist| while(1) { Delay(100); } }