Test additional content header

ValueMathRoundT Method

Rounds a decimal value to a specified underlying number of fractional digits, and rounds midpoint values to the nearest even number.

Definition

Namespace: Fluent.Calculations.Primitives.BaseTypes
Assembly: 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

Parameters

d  T
A number to be rounded.
decimals  T
The number of decimal places in the return value.

Type Parameters

T
Type of value

Return Value

T
The 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.

Remarks

Please refer to .NET Math.Round(Decimal, Int32) documentation for more details.

See Also