User:SignpostMarv Martin/Sandbox/llAbs

From Second Life Wiki
< User:SignpostMarv Martin
Revision as of 17:45, 10 February 2007 by Strife Onizuka (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

integer llAbs (integer val)

llAbs returns the distance of the integer val from 0. This function will be useful if the result of an operation or function is not guaranteed to be a positive integer or negative integer.

llFabs is the equivalent function to use when the result of an operation or function is known to be always or occasionally a float, although the result of such an operation or function could be typecast to an integer


llAbs(-5); //returns 
llAbs(3); // returns 3
llAbs((integer)-7.99); //returns 7