Quad.Round Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Round( | Rounds a Quad value to the nearest integral value. |
Round( | Rounds a Quad value to a specified number of fractional digits. |
Round( | Rounds a Quad value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers. |
Round( | Rounds a Quad value to a specified number of fractional digits. A parameter specifies how to round the value if it is midway between two other numbers. |
Round(Quad)
Rounds a Quad value to the nearest integral value.
public static Quad Round(
Quad value
)
Parameters
- value Quad
- A quadruple precision number to be rounded.
Return Value
QuadThe integer nearest parameter value. If the fractional component of value is halfway between two integers, one of which is even and the other odd, the even number is returned. Note that this method returns a System.Decimal instead of an integral type.
Implements
IFloatingPoint<TSelf>.Round(TSelf)Exceptions
Overflow | The result is outside the range of a System.Decimal. |
Round(Quad, Int32)
Rounds a Quad value to a specified number of fractional digits.
public static Quad Round(
Quad value,
int decimals
)
Parameters
- value Quad
- A quadruple precision number to be rounded.
- decimals Int32
- The number of Quad places in the return value.
Return Value
QuadThe number nearest to value that contains a number of fractional digits equal to decimals.
Implements
IFloatingPoint<TSelf>.Round(TSelf, Int32)Exceptions
Argument | decimals is less than 0 or greater than 28. |
Overflow | The result is outside the range of a System.Decimal. |
Round(Quad, MidpointRounding)
Rounds a Quad value to the nearest integer. A parameter specifies how
to round the value if it is midway between two other numbers.
public static Quad Round(
Quad value,
MidpointRounding mode
)
Parameters
- value Quad
- A quadruple precision number to be rounded.
- mode MidpointRounding
- Specification for how to round value if it is midway between two other numbers.
Return Value
QuadThe integer nearest value. If value is halfway between two numbers, one of which is even and the other odd, then mode determines which of the two is returned.
Implements
IFloatingPoint<TSelf>.Round(TSelf, MidpointRounding)Exceptions
Argument | mode is not a valid value of System.MidpointRounding. |
Overflow | The result is outside the range of a System.Decimal. |
Round(Quad, Int32, MidpointRounding)
Rounds a Quad value to a specified number of fractional digits. A parameter
specifies how to round the value if it is midway between two other numbers.
public static Quad Round(
Quad value,
int decimals,
MidpointRounding mode
)
Parameters
- value Quad
- A quadruple precision number to be rounded.
- decimals Int32
- The number of Quad places in the return value.
- mode MidpointRounding
- Specification for how to round value if it is midway between two other numbers.
Return Value
QuadThe number nearest to value that contains a number of fractional digits equal to decimals. If the number of fractional digits in value is less than decimals, value is returned unchanged.
Implements
IFloatingPoint<TSelf>.Round(TSelf, Int32, MidpointRounding)Exceptions
Argument | decimals is less than 0 or greater than 28. |
Argument | mode is not a valid value of System.MidpointRounding. |
Overflow | The result is outside the range of a System.Decimal. |