Difference between revisions of "LlFabs"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
{{LSL Function
{{LSL Function
|inject-2={{Issues/SCR-439}}
|func=llFabs|sort=Fabs
|func=llFabs|sort=Fabs
|func_id=7|func_sleep=0.0|func_energy=10.0
|func_id=7|func_sleep=0.0|func_energy=10.0

Revision as of 13:30, 8 October 2012

Summary

Function: float llFabs( float val );

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

Caveats

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   Mono only: llFabs of Negative Zero is negative, should be positive.

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

All Issues

~ Search JIRA for related Issues
   Mono only: llFabs of Negative Zero is negative, should be positive.

Signature

function float llFabs( float val );