Files
liquid/_filters/round.md
2019-07-28 16:27:13 -04: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 }} ```