DoubleExtensions

StockSharp.Xaml.Charting.Common.Extensions

Methoden

RoundOff(double, int, MidpointRounding) : double

Rounds using arithmetic (5 rounds up) symmetrical (up is away from zero) rounding

d
A double number to be rounded.
decimals
The number of significant fractional digits (precision) in the return value.
mode
The midpoint rounding mode

Rückgabe: The number nearest d with precision equal to decimals. If d is halfway between two numbers, then the nearest whole number away from zero is returned.