MathUtilRound Method

Overload List

Round(Double, Double) Round down value to number of significant digits.

The numSignificantDigits is a log10 number, i.e. it can be used to remove insignificant digits only for small numbers, i.e. . Round(19, System.Math.Log10(20) = 19 - no rounding Round(20, System.Math.Log10(20) = 20 - on the boundary of rounding Round(21, System.Math.Log10(20) = 20 - rounding Round(31, System.Math.Log10(20) = 30 - rounding

Round(Int32, Double) Round down integer value to number of significant digits.

The numSignificantDigits is a log10 number, i.e. it can be used to remove insignificant digits only for small numbers, i.e. . Round(19, System.Math.Log10(20) = 19 - no rounding Round(20, System.Math.Log10(20) = 20 - on the boundary of rounding Round(21, System.Math.Log10(20) = 20 - rounding Round(31, System.Math.Log10(20) = 30 - rounding

See Also