rint - Rounds to nearest integer.
rint(var);
The rint() functions round their argument to an integer value in floating point format, using the current rounding direction and without raising the inexact exception.
The rint function rounds its argument to an integer value in floating point format, using the current rounding direction and without raising the inexact exception. This means that it will only return the number before the comma.
Note: In the followings examples, the _ between the { should be removed to make it work.
res={_{rint(2.5); }}. return res=2. res={_{rint("2.5"); }}. return res=2. res={_{rint(-2.5); }}. return res=-2. res={_{a=[-2, 2, 2.5, { x : -2.5 } ]; rint(a); a;}}. return res=\[-2,2,2,{"x":-2}]\[-2,2,2.5,{"x":-2.5}].
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com