Difference between revisions of "LlAbs"

From Second Life Wiki
Jump to navigation Jump to search
Line 34: Line 34:
</lsl>
</lsl>
|helpers
|helpers
|also=[http://en.wikipedia.org/wiki/Absolute_value Wikipedia - Absolute value]]
|also=[http://en.wikipedia.org/wiki/Absolute_value Wikipedia - Absolute value]
|notes
|notes
}}
}}
{{lowercase|llAbs}}
__NOTOC__
{| width="100%"
|-
|valign="top"|
<div id="box">
<div style="padding: 0.5em">
Returns the absolute value of the integer passed to it.
</div>
</div>
|-
|<div id="box">
== [[integer]] llAbs( [[integer]] number); ==
<div style="padding: 0.5em">
* number - Any valid integer value
</div>
</div>
|-
|
<div id="box">
== Specification ==
<div style="padding: 0.5em">
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.
{|
|-
| [[LSL_Energy|Energy]]:
| 10.0
|-
| [[LSL_Sleep|Sleep]]:
| 0.0
|-
| [[LSL_Function_ID|Function ID]]:
| 6
|}
</div>
</div>
|-
|
<div id="box">
== Caveats ==
<div style="padding: 0.5em">
* None Known
</div>
</div>
|-
|
<div id="box">
== Examples ==
<div style="padding: 0.5em">
</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:03, 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: integer llAbs( integer val );

Returns an integer that is the positive version of val.

• integer val

Examples

<lsl> default {

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

}

</lsl>

Deep Notes

Search JIRA for related Issues

Signature

function integer llAbs( integer val );