MathUtilRound(Int32, Double) Method

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

Definition

Namespace: DHI.Mike1D.Generic
Assembly: DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public static int Round(
	int value,
	double numSignificantDigits
)

Parameters

value  Int32

[Missing <param name="value"/> documentation for "M:DHI.Mike1D.Generic.MathUtil.Round(System.Int32,System.Double)"]

numSignificantDigits  Double

[Missing <param name="numSignificantDigits"/> documentation for "M:DHI.Mike1D.Generic.MathUtil.Round(System.Int32,System.Double)"]

Return Value

Int32

[Missing <returns> documentation for "M:DHI.Mike1D.Generic.MathUtil.Round(System.Int32,System.Double)"]

See Also