std::round, std::lround, std::llround
提供: 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 round( float arg ); |
(C++11およびそれ以降) | |
double round( double arg ); |
(C++11およびそれ以降) | |
long double round( long double arg ); |
(C++11およびそれ以降) | |
double round( Integral arg ); |
(C++11およびそれ以降) | |
long lround( float arg ); |
(C++11およびそれ以降) | |
long lround( double arg ); |
(C++11およびそれ以降) | |
long lround( long double arg ); |
(C++11およびそれ以降) | |
long lround( Integral arg ); |
(C++11およびそれ以降) | |
long long llround( float arg ); |
(C++11およびそれ以降) | |
long long llround( double arg ); |
(C++11およびそれ以降) | |
long long llround( long double arg ); |
(C++11およびそれ以降) | |
long long llround( Integral arg ); |
(C++11およびそれ以降) | |
arg
に最も近い整数を計算します。数が中途半端なケースではゼロから離れて丸められます Original:
Computes nearest integer to
arg
. Number is rounded 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.
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 to
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: 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) |
与えられた値よりも大きさが大きくない最も近い整数 Original: nearest integer not greater in magnitude 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. (関数) |