round

The round filter exists to round a number. This can be useful if you need to perform floating-point math, and then turn the result into a rounded integer. The round filter takes optional arguments to define a precision (default of 0) and a rounding method. The possible rounding methods are common (rounds up or down, and the default), ceil (always round up), and floor (always round down). In this example, we'll chain two filters together to commonly round a math result to zero precision, and then turn that into an integer:

{{ math_result | round | int }} 

Therefore, if the math_result variable was set to 3.4, the output of the previous filter chain would be 3.