Big Rational.Round Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
Overload List
Round( | Rounds a rational number to the nearest integer. |
Round( | Rounds a rational number to the specified number of decimal digits. |
Round(BigRational)
Rounds a rational number to the nearest integer.
public static BigRational Round(
BigRational value
)
Parameters
- value BigRational
- A rational number.
Return Value
BigRationalThe integer rational number that is closest to value.
Round(BigRational, Int32)
Rounds a rational number to the specified number of decimal digits.
public static BigRational Round(
BigRational value,
int decimals
)
Parameters
- value BigRational
- A rational number.
- decimals Int32
- The number of decimal digits.
Return Value
BigRationalA rational number with decimals digits after the decimal point that is closest to value.
Remarks
If decimals is negative, then the result is an integer that is a multiple of a power of ten. Results are rounded towards zero.