$nav ===== Function: llFloor ===== integer llFloor(float fval) Round a $ty[float] down to the closest $ty[integer] less than or equal to it. ===== Parameters ===== === fval === The $lty[float] value to be rounded down. ===== Return value ===== Returns the nearest $lty[integer] value that is less than or equal to $prm[fval]. ===== Notes ===== * The function returns -2147483648 (Hex. 0x80000000) for float values of 2147483648.0 (including $pinf) or bigger, or less than -2147483648.0 (including $minf), or $nan. ===== Short examples ===== integer i; i = llFloor(3.0); // i will become 3, which is less or equal to 3.0 (in this case, equal). i = llFloor(3.001); // i will become 3, not 4, because 4 is greater than 3.001 and the result must be less or equal. i = llFloor(3.999); // i will become 3 i = llFloor(4.0); // i will become 4 i = llFloor(-3.0); // i will become -3 i = llFloor(-3.001); // i will become -4, which is less or equal to -3.001 (in this case, less) i = llFloor(-3.999); // i will become -4 i = llFloor(-4.0); // i will become -4 ===== See also ===== * $lfn[llRound] rounds to nearest integer. * $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). * $lty[float] type and associated caveats and limitations.