IMathTNumericRound(TNumeric, Int32, MidpointRounding) Method

Rounds a value to a specified number of fractional digits using the specified rounding convention.

Definition

Namespace: Jodosoft.Numerics
Assembly: Jodosoft.Numerics (in Jodosoft.Numerics.dll) Version: 2.0
TNumeric Round(
	TNumeric value,
	int digits,
	MidpointRounding mode
)

Parameters

value  TNumeric
A number to be rounded.
digits  Int32
The number of fractional digits in the return value.
mode  MidpointRounding
One of the enumeration values that specifies which rounding strategy to use.

Return Value

TNumeric
The number that has digits fractional digits that value is rounded to. If value has fewer fractional digits than digits, value is returned unchanged.

Remarks

This method may return NaN or Infinity. If NaN or Infinity cannot be represented by TNumeric, then this method may throw an ArithmeticException.

See Also