ValueMathRoundT Method
Rounds a decimal value to a specified underlying number of fractional digits, and rounds midpoint values to the nearest even number.
Namespace: Fluent.Calculations.Primitives.BaseTypesAssembly: Fluent.Calculations.Primitives (in Fluent.Calculations.Primitives.dll) Version: 1.1.0-aplha
public static T Round<T>(
T d,
T decimals
)
where T : new(), IValueProvider
- d T
- A number to be rounded.
- decimals T
- The number of decimal places in the return value.
- T
- Type of value
TThe value with the number nearest to d that contains a number of fractional digits equal to decimals, expression name and input value as an argument.
Please refer to .NET Math.Round(Decimal, Int32) documentation for more details.