Functions.Round 方法 |
命名空间: XSharp.RT
FUNCTION Round( nNumber AS USUAL, siDecimals AS LONG ) AS USUAL
public static __Usual Round( __Usual nNumber, int siDecimals )
1SetDecimal(2) 2SetFixed(TRUE) 3? Round(10.4, 0) // 10 4? Round(10.5, 0) // 11 5? Round(10.51, 0) // 11 6? Round(10.49999999999999, 2) // 10.50
1? Round(101.99, -1) // 100 2? Round(109.99, -1) // 110 3? Round(109.99, -2) // 100