You are here:
roundDown(value, precision)
This function returns a value that’s rounded down 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 rounded down to the specified number of digits.
Sample Usage
Utils.roundDown(2.11,0)
Utils.roundDown(-1.91,1)
Example Results of roundDown(value, precision)
| Value | Precision | Result |
|---|---|---|
| -1.91 | 0 | -2 |
| -1.91 | 1 | -2 |
| -1.91 | 2 | -1.91 |
| -1.9 | 1 | -1.9 |
| 1.91 | 0 | 1 |
| 1.91 | 1 | 1.9 |
| 1.91 | 2 | 1.91 |
| 7.86 | 0 | 7 |
| 7.86 | 1 | 7.8 |
| 7.86 | 2 | 7.86 |
| 4.99 | 0 | 4 |
| 4.99 | 1 | 4.9 |
| 4.99 | 2 | 4.99 |
| 12.344 | 0 | 12 |
| 12.344 | 1 | 12.3 |
| 12.344 | 2 | 12.34 |
| 16.367 | 0 | 16 |
| 16.367 | 1 | 16.3 |
| 16.367 | 2 | 16.36 |
Did this article solve your issue?
Let us know so we can improve!

