Difference between revisions of "LlFabs"

From Second Life Wiki
Jump to navigation Jump to search
m (LlFabs moved to LSL llFabs)
Line 1: Line 1:
{{lowercase|llFabs}}
{{LSLFunctionAll
__NOTOC__
|func=llFabs
 
|func_id=6
{| width="100%"
|func_sleep=0.0
|-
|func_energy=10.0
|<div id="box">
|func_footnote
== [[LSL_Type_float|float]] llFabs( [[LSL_Type_float|float]] val); ==
|p1_type=float
<div style="padding: 0.5em">
|p1_name=val
* val - Any valid float value
|p1_desc=Any valid float value
</div>
|p2_type|p2_name|p2_desc
</div>
|p3_type|p3_name|p3_desc
|-
|p4_type|p4_name|p4_desc
|
|p5_type|p5_name|p5_desc
<div id="box">
|p6_type|p6_name|p6_desc
 
|p7_type|p7_name|p7_desc
== Specification ==
|p8_type|p8_name|p8_desc
<div style="padding: 0.5em">
|p9_type|p9_name|p9_desc
This function returns the absolute value passed to it. Basically, it removes the negative sign, on the number if there is one. If the parameter is a positive one, it just returns it.
|p10_type|p10_name|p10_desc
{|  
|p11_type|p11_name|p11_desc
|-
|p12_type|p12_name|p12_desc
| [[LSL_Energy|Energy]]:
|return_type=float
| 10.0
|return_text=that is the positive version of val.
|-
|spec
| [[LSL_Sleep|Sleep]]:
|caveats
| 0.0
|examples=
|-
| [[LSL_Function_ID|Function ID]]:
| 7
|}
</div>
</div>
|-
|
<div id="box">
 
== Caveats ==
<div style="padding: 0.5em">
</div>
</div>
 
|-
|
<div id="box">
== Examples ==
<div style="padding: 0.5em">
<lsl>
<lsl>
default {
default
  state_entry()
{
  {
    state_entry()
      llSay(0,"The absolute value of -4.5 is: "+(string)llFabs(-4.5) );
    {
  }
        llSay(0,"The absolute value of -4.5 is: "+(string)llFabs(-4.5) );
    }
}
}
</lsl>
</lsl>
</div>
|helpers
</div>
|also=[http://en.wikipedia.org/wiki/Absolute_value Wikipedia - Absolute value]
|-
|notes
|
}}
<div id="box">
== Helper Functions ==
<div style="padding: 0.5em">
<lsl>
</lsl>
</div>
</div>
|-
|
<div id="box">
== See Also ==
<div style="padding: 0.5em">
</div>
</div>
|-
|
<div id="box">
== Notes ==
<div style="padding: 0.5em">
</div>
</div>
|}


[[Category:LSL_Functions]]
[[Category:LSL_Functions]]
[[Category:LSL_Math]]
[[Category:LSL_Math]]

Revision as of 20:09, 25 January 2007

   Outdated templated used

Please change the template from 'LSLFunctionAll' to 'LSL_Function' (just replace 'LSLFunctionAll' with 'LSL_Function', do this after fixing any other erorr messages.

   'also' Tag Removed

(Please use 'also_header','also_events','also_functions','also_articles', or 'also_footer')

Summary

Function: float llFabs( float val );

Returns a float that is the positive version of val.

• float val Any valid float value

Examples

<lsl> default {

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

}

</lsl>

Deep Notes

Search JIRA for related Issues

Signature

function float llFabs( float val );