You are here:
roundUp(value, precision)
This function returns a value that’s rounded up to the specified number of digits in the precision parameter.
Required Editions
| Available in Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled. |
Parameters
- value: Decimal value to round.
- precision: Number of digits to round to an integer.
Returns
- value: Decimal value that’s rounded to the specified number of digits.
Sample Usage
Utils.roundUp(2.11,0)
Utils.roundUp(-1.91,1)
Example Results of roundUp(value, precision)
| Value | Precision | Result |
|---|---|---|
| -1.91 | 0 | -1 |
| -1.91 | 1 | -1.9 |
| -1.91 | 2 | -1.91 |
| 1.91 | 0 | 2 |
| 1.91 | 1 | 2 |
| 1.91 | 2 | 1.91 |
| 7.86 | 0 | 8 |
| 7.86 | 1 | 7.9 |
| 7.86 | 2 | 7.86 |
| 4.99 | 0 | 5 |
| 4.99 | 1 | 5 |
| 4.99 | 2 | 4.99 |
| 12.344 | 0 | 13 |
| 12.344 | 1 | 12.4 |
| 12.344 | 2 | 12.35 |
| 16.367 | 0 | 17 |
| 16.367 | 1 | 16.4 |
| 16.367 | 2 | 16.37 |
Did this article solve your issue?
Let us know so we can improve!

