Unofficial LSL Reference

[[functions:llabs]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

This is an old revision of the document!


Function: llAbs

Parameters

IntVal
a positive or negative integer value or the name of an integer variable.

Result

The result will be an integer that is the absolute value of IntVal, that is the value with any negative sign removed.

Notes

  • To determine the absolute value of a float, use llFabs

Examples

This example illustrates the use of llAbs:

llAbs-example.lsl
default
{
    state_entry()
    {
        integer AbsInt = llAbs(-45);   // result will be 45
    }
}

See also