BigDecimal BigDecimal
BigDecimal BigDecimal
DocFX + Singulink = ♥

Search Results for

    Method Round

    Round(BigDecimal, RoundingMode)

    Rounds the value to the nearest integer using the given rounding mode.

    Declaration
    public static BigDecimal Round(BigDecimal value, RoundingMode mode = RoundingMode.MidpointToEven)
    Parameters
    Type Name Description
    BigDecimal value
    RoundingMode mode
    Returns
    Type Description
    BigDecimal

    Round(BigDecimal, int, RoundingMode)

    Rounds the value to the specified number of decimal places using the given rounding mode.

    Declaration
    public static BigDecimal Round(BigDecimal value, int decimals, RoundingMode mode = RoundingMode.MidpointToEven)
    Parameters
    Type Name Description
    BigDecimal value
    int decimals
    RoundingMode mode
    Returns
    Type Description
    BigDecimal
    Remarks

    A negative number of decimal places indicates rounding to a whole number digit, i.e. -1 for the nearest 10, -2 for the nearest 100, etc.

    © Singulink. All rights reserved.