Files
liquid/filters/round.md
2016-04-02 18:46:32 -04:00

617 B

title
title
round

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 }} ```