The rounding conditions can be defined with the help of the round filter.
- first parameter defines the number of decimals, which is 1 in our example
- second parameter, it is either floor or ceil
floor rounds the numbers down regardless of the common rounding rules
{{ 42.58|round(1, 'floor') }}
Result
42.5
ceil rounds the numbers up in any case
{{ 42.54|round(1, 'ceil') }}
Result
42.6
{{ 42.52|round }}
Result
43