Method RoundToPrecision
RoundToPrecision(BigDecimal, int, RoundingMode)
Rounds the value to the specified precision using the given rounding mode.
Declaration
public static BigDecimal RoundToPrecision(BigDecimal value, int precision, RoundingMode mode = RoundingMode.MidpointToEven)
Parameters
| Type | Name | Description |
|---|---|---|
| BigDecimal | value | |
| int | precision | |
| RoundingMode | mode |
Returns
| Type | Description |
|---|---|
| BigDecimal |