Function std.math.rint
Rounds x
to the nearest integer value, using the current rounding
mode.
If the return value is not equal to x
, the FE_INEXACT
exception is raised.
nearbyint
performs
the same operation, but does not set the FE_INEXACT exception.
Prototypes
real rint( real x ) pure nothrow @nogc @safe; double rint( double x ) pure nothrow @nogc @safe; float rint( float x ) pure nothrow @nogc @safe;
Authors
Walter Bright, Don Clugston, Conversion of CEPHES math library to D by Iain Buclaw