Returns the value of x rounded upward to the next integer (toward positive infinity).
Returns the value of x rounded downward to the next integer (toward negative infinity).
Rounds x to the nearest integer value, using the current rounding mode.
Return the value of x rounded to the nearest integer.
Rounds x to the nearest integer value, using the current rounding mode.
Round val to a multiple of unit. rfunc specifies the rounding function to use; by default this is rint, which uses the current rounding mode.
Round val to a multiple of pow(base, exp). rfunc specifies the rounding function to use; by default this is rint, which uses the current rounding mode.
Rounds x to the nearest integer value, using the current rounding mode.
Returns x rounded to a long value using the current rounding mode. If the integer value of x is greater than long.max, the result is indeterminate.
Return the value of x rounded to the nearest integer. If the fractional part of x is exactly 0.5, the return value is rounded away from zero.
Returns the integer portion of x, dropping the fractional portion. This is also known as "chop" rounding. pure on all platforms.
Copyright The D Language Foundation 2000 - 2011. D implementations of floor, ceil, and lrint functions are based on the CEPHES math library, which is Copyright (C) 2001 Stephen L. Moshier <steve@moshier.net> and are incorporated herein by permission of the author. The author reserves the right to distribute this material elsewhere under different copying permissions. These modifications are distributed here under the following terms:
This is a submodule of std.math.
It contains several functions for rounding floating point numbers.