C++官网参考链接:https://cplusplus.com/reference/cmath/round/
函数
<cmath>
round
C99
double round(double x);
float roundf(float x);
long double roundl(long double x);
C++11
double round(double x);
float round(float x);
long double round(long double x);
double round (T x); // additional overloads for integral types
向最近舍入
返回最接近x的整数值,中间情况舍入到远离0。
C99
头文件
C++11
在此头文件(