Files
liquid/filters/round.md
2016-11-08 16:23:33 -05:00

689 B

title, description
title description
round Liquid filter that rounds a number to the nearest integer.

Rounds an input number to the nearest integer or, if a number is specified as an argument, to that number of decimal places.

Input

```liquid {% raw %} {{ 1.2 | round }} {% endraw %} ```

Output

```text {{ 1.2 | round }} ```

Input

```liquid {% raw %} {{ 2.7 | round }} {% endraw %} ```

Output

```text {{ 2.7 | round }} ```

Input

```liquid {% raw %} {{ 183.357 | round: 2 }} {% endraw %} ```

Output

```text {{ 183.357 | round: 2 }} ```