Unofficial LSL Reference

[[functions:llround]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

functions:llround [2014-05-21 15:15 SLT]
sei [Short examples] Another screwup left
functions:llround [2015-02-04 13:29 SLT] (current)
sei pinf and minf
Line 1: Line 1:
 +$nav
 ===== Function: llRound ===== ===== Function: llRound =====
  
Line 5: Line 6:
 </​code>​ </​code>​
  
-Round a float to the nearest integer.+Round a $lty[floatto the nearest integer.
  
 ===== Parameters ===== ===== Parameters =====
  
 === fval === === fval ===
-The float value to be rounded.+The $lty[floatvalue to be rounded.
  
 ===== Return value ===== ===== Return value =====
  
-Returns the integer value that is the nearest to **fval**. If the decimal part is exactly .5, it will be rounded up (towards positive infinity).+Returns the integer value that is the nearest to $prm[fval]. If the decimal part is exactly .5, it will be rounded up (towards positive infinity).
  
 ===== Notes ===== ===== Notes =====
  
-  * The function returns -2147483648 (Hex. 80000000) for float values of 2147483648.0 or bigger, or less than -2147483648.0,​ or **NaN**.+  * The function returns -2147483648 (Hex. 0x80000000) for float values of 2147483648.0 or bigger ​(including $pinf), or less than -2147483648.0 ​(including $minf), or $nan.
  
 ===== Short examples ===== ===== Short examples =====
Line 41: Line 42:
 ===== See also ===== ===== See also =====
  
-  * [[llCeil]] rounds always towards positive infinity (e.g. 1.1 is rounded up to 2.0, and -1.1 is rounded up to -1.0). +  * $lfn[llCeil] rounds always towards positive infinity (e.g. 1.1 is rounded up to 2.0, and -1.1 is rounded up to -1.0). 
-  * [[llFloor]] rounds always towards negative infinity (e.g. 1.1 is rounded down to 1.0 and -1.1 is rounded down to -2.0). +  * $lfn[llFloor] rounds always towards negative infinity (e.g. 1.1 is rounded down to 1.0 and -1.1 is rounded down to -2.0). 
-  * [[types/float]] type and associated caveats and limitations.+  * $lty[float] type and associated caveats and limitations.