Click or drag to resize

RoundingRoundToNumberOfSignificantDigits Method

Rounds a double number to the provided number of significant digits.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static double RoundToNumberOfSignificantDigits(
	double x,
	int significantDigits,
	MidpointRounding rounding
)

Parameters

x  Double
The value to round.
significantDigits  Int32
The number of significant digits.
rounding  MidpointRounding
The rounding rule that should be applied.

Return Value

Double
The number, rounded to the provided number of significant digits.
See Also