round, lround, llround
From cppreference.com
Defined in header <math.h>
|
||
float roundf( float arg ); |
(since C99) | |
double round( double arg ); |
(since C99) | |
long double roundl( long double arg ); |
(since C99) | |
long lroundf( float arg ); |
(since C99) | |
long lround( double arg ); |
(since C99) | |
long lroundl( long double arg ); |
(since C99) | |
long long llroundf( float arg ); |
(since C99) | |
long long llround( double arg ); |
(since C99) | |
long long llroundl( long double arg ); |
(since C99) | |
Computes nearest integer to arg. Number is rounded away from zero in halfway cases
[edit] Parameters
arg | - | floating point value |
[edit] Return value
Nearest integer to arg.
[edit] See also
nearest integer not greater than the given value (function) | |
nearest integer not less than the given value (function) | |
(C99) |
nearest integer not greater in magnitude than the given value (function) |
C++ documentation for round
|