round, lround, llround
来自cppreference.com
|
|
该页由英文版wiki使用Google Translate机器翻译而来。
该翻译可能存在错误或用词不当。鼠标停留在文本上可以看到原版本。你可以帮助我们修正错误或改进翻译。参见说明请点击这里. |
| 在头文件 <math.h> 中定义
|
||
| float roundf( float arg ); |
||
| double round( double arg ); |
||
| long double roundl( long double arg ); |
||
| long lroundf( float arg ); |
||
| long lround( double arg ); |
||
| long lroundl( long double arg ); |
||
| long long llroundf( float arg ); |
||
| long long llround( double arg ); |
||
| long long llroundl( long double arg ); |
||
计算最接近的整数
arg。从零中途情况下是圆形的号码 原文:
Computes nearest integer to
arg. Number is rounded away from zero in halfway cases [编辑] 参数
| arg | - | 浮点值
|
[编辑] 返回值
最接近的整数
arg.[编辑] 另请参阅
| 最接近的整数不大于给定值 原文: nearest integer not greater than the given value (函数) | |
| 最接近的整数不小于给定的值 原文: nearest integer not less than the given value (函数) | |
| (C99) |
最接近的整数的幅值比不大于给定值 原文: nearest integer not greater in magnitude than the given value (函数) |
| C++ documentation for round
| |