DecimalExtensions
StockSharp.Xaml.Charting.Common.Extensions
Methods
RoundOff
internal static decimal RoundOff(decimal d, int decimals, MidpointRounding mode)
result = DecimalExtensions.RoundOff(d, decimals, mode)
Rounds using arithmetic (5 rounds up) symmetrical (up is away from zero) rounding
- d
- A Decimal number to be rounded.
- decimals
- The number of significant fractional digits (precision) in the return value.
- mode
- The midpoint rounding mode
Returns: 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.