Difference between revisions of "LlFabs"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 6: Line 6:
|return_type=float
|return_type=float
|return_text=that is the positive version of {{LSLP|val}}.
|return_text=that is the positive version of {{LSLP|val}}.
|other_languages={{LSL OL|C++|[http://www.cplusplus.com/reference/clibrary/cmath/fabs/ fabs]}}
|spec
|spec
|caveats
|caveats

Revision as of 17:18, 24 August 2012

Summary

Function: float llFabs( float val );
0.0 Forced Delay
10.0 Energy

Returns a float that is the positive version of val.

• float val Any valid float value
This function is similar to functions (e.g. fabs) found in many other languages: 
C++
fabs

Examples

<lsl> default {

   state_entry()
   {
       llSay(0,"The (Float)absolute value of -4.5 is: "+(string)llFabs(-4.5) );
   }

} // returns : // The (Float)absolute value of -4.5 is: 4.500000

</lsl>

See Also

Functions

•  llAbs integer version of llFabs

Articles

•  "Wikipedia logo"Absolute value

Deep Notes

Signature

function float llFabs( float val );