IMathTNumericRound(TNumeric, Int32, MidpointRounding) Method
Rounds a value to a specified number of fractional digits using the specified rounding convention.
Namespace: Jodosoft.NumericsAssembly: Jodosoft.Numerics (in Jodosoft.Numerics.dll) Version: 2.0
TNumeric Round(
TNumeric value,
int digits,
MidpointRounding mode
)
Function Round (
value As TNumeric,
digits As Integer,
mode As MidpointRounding
) As TNumeric
TNumeric Round(
TNumeric value,
int digits,
MidpointRounding mode
)
abstract Round :
value : 'TNumeric *
digits : int *
mode : MidpointRounding -> 'TNumeric
- 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.
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.
This method may return
NaN or Infinity.
If
NaN or Infinity cannot be represented by
TNumeric,
then this method may throw an
ArithmeticException.