std::trunc
来自cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Defined in header <cmath>
|
||
float trunc( float arg ); |
(C++11 起) | |
double trunc( double arg ); |
(C++11 起) | |
long double trunc( long double arg ); |
(C++11 起) | |
double trunc( Integral arg ); |
(C++11 起) | |
计算最接近的整数强度更大的
arg
Original:
Computes nearest integer not greater in magnitude than
arg
. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 参数
arg | - | 浮点值
Original: floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 返回值
最接近的整数强度更大的
arg
Original:
Nearest integer not greater in magnitude than
arg
. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[[Image:
返回值
|200x200px]]Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Argument
[编辑] 注释
整数值可以始终代表给定的浮点类型.
Original:
The integer value can be always represented by the given floating point type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 另请参阅
最接近的整数不大于给定值 Original: nearest integer not greater than the given value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
最接近的整数不小于给定的值 Original: nearest integer not less than the given value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
(C++11) (C++11) (C++11) |
最接近的整数,四舍五入的距离零中途情况下 Original: nearest integer, rounding away from zero in halfway cases The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) |