rint

Rounds the given value to the nearest integer, using the current rounding mode.

@safe @nogc nothrow pure pragma(inline, true)
T
rint
(
T
)
(
T x
)
if (
__traits(isFloating, T)
)

Parameters

x T

The value

Return Value

Type: T

x rounded to the nearest integer in respect to rounding mode.

Meta