round()は数値 n を i の最も近い増分に丸めるために使用します。指定された数値が 2 つの増分から等しく離れている場合、この関数は最も近い偶数の増分に丸めます。
roundToNearest ( n As Number, _ i As Number ) As Number
引数 | [タイプ] | 説明 |
---|---|---|
n | [数] | 入力数値です。 |
i | [数] | 概数で表すための増分です。 |
Intent >roundToNearest(5.73, 0.25) --> 5.75
Intent >roundToNearest(-0.37, 0.1) --> -0.4
Intent >roundToNearest(376.9, 10) --> 380.0
Intent >roundToNearest(385, 10) --> 380.0390.0 を返す roundInc(385, 10)と比較します