Difference between revisions of "LlRound"

From Second Life Wiki
Jump to navigation Jump to search
Line 4: Line 4:
|func_sleep=0.0
|func_sleep=0.0
|func_energy=10.0
|func_energy=10.0
|func_footnote=If the absolute value of the tenths position is 4 or less, val is rounded off; otherwise, val is rounded towards +/- infinity.
|func_footnote=If the absolute value of the tenths position is 4 or less, val is rounded off; otherwise, val is rounded towards infinity of like signedness of val.
|p1_type=float
|p1_type=float
|p1_name=val
|p1_name=val

Revision as of 22:48, 27 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.

Summary

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

Returns a float that is the integer value of val rounded towards zero by traditional numeric rounding.

• float val Any valid float value

If the absolute value of the tenths position is 4 or less, val is rounded off; otherwise, val is rounded towards infinity of like signedness of val.

Examples

<lsl> default {

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

}

</lsl>

See Also

Functions

Deep Notes

Signature

function float llRound( float val );