|
inlineconstexpr |
Computes the integer nearest to the input.
Defined in Header
Parameters
Return value
The integer nearest to x
.
For complex inputs the round operation is applied to both real and imaginary parts.
Masked Call
The call eve;round[mask](x)
provides a masked version of eve::round
which is equivalent to if_else (mask, round(x), x)
.
Example
The expression eve::downward(eve::round)(x)
is equivalent to eve::floor(x)
.
The expression eve::upward(eve::round)(x)
is equivalent to eve::ceil(x)
.
The expression to_nearest(eve::round)(x)
is equivalent to eve::nearest(x)
.
The expression eve::toward_zero(eve::round)(x)
is equivalent to eve::trunc(x)
.