PrecisionModel.Rounding

PrecisionModel.Rounding method

Returns a rounding precision model. According to rounding precision model only a limited number of digits are significant.

public static PrecisionModel Rounding(int significantDigits)
ParameterTypeDescription
significantDigitsInt32Number of significant digits.

Return Value

Rounding Precision model.

Exceptions

exceptioncondition
ArgumentOutOfRangeExceptionNumber of significant digits is less then 0 or more than 15.

Remarks

When applied to a coordinate, the following code is used to reduce precision:

double rounded = Math.Round(value, significantDigits);

See Also