Rounds a decimal value to a specified number of fractional digits.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static decimal Round(
decimal value,
int decimals
)
Public Shared Function Round (
value As Decimal,
decimals As Integer
) As Decimal
public:
static Decimal Round(
Decimal value,
int decimals
)
static member Round :
value : decimal *
decimals : int -> decimal
Parameters
- value
- Type: SystemDecimal
A decimal number to be rounded.
- decimals
- Type: SystemInt32
The number of decimal places in the return value.
Return Value
Type:
Decimal
The number nearest to value that contains a number of fractional digits equal
to decimals.
Reference