round
To use a filter on a variable in an expression, write the variable then put a |
pipe symbol, then write the filter name:
number|round
This filter has some extra parameters that can be put after the name in brackets:
number|round(precision, method)
Use this to round a number to the nearest integer.
number = 12.3 number = number|round # 12