Abs

From Bennu Wiki
Jump to navigation Jump to search


Definition

FLOAT abs ( <FLOAT value> )

Returns the absolute value of value.

Parameters

FLOAT value - The value.

Returns

FLOAT : The absolute value of value.

Example

Global
    float value1;
    int value2;
End

Process Main()
Begin

    write_float(0,0, 0,0,&value1);
    write_int(0,0,10,0,&value2);

    value1 = abs(3);
    value2 = abs(-4);

    Repeat
        frame;
    Until(key(_ESC))

End

Used in example: write_float(), write_int(), abs(), key()


Math Functions
Abs()Acos()Asin()Atan()Atan2()Cos()Fget_angle()Fget_dist()Finite()Get_distx()Get_disty()Isinf()Isnan()Near_angle()Pow()Rand()Rand_seed()Sin()Sqrt()Tan()