Table of Contents

Method RoundDecimal

Namespace
WhalesSecret.TradeScriptLib.Utils.Math
Assembly
WhalesSecret.TradeScriptLib.dll

RoundDecimal(decimal, int)

Rounds number to the given number of decimal places.

public static decimal RoundDecimal(this decimal number, int decimals)

Parameters

number decimal

Number to round.

decimals int

Number of decimal places to round the number to. This can be negative. See GetDecimalPlaces(decimal, bool).

Returns

decimal

Rounded number.