abs - Liquid Filter Reference - 0.11.4
Filter Name | abs |
Group | Numbers |
Version | 0.11.4 |
Description
Returns the absolute value of a number.
Examples
When a negative number is provided:
{{ -17 | abs }}
17
When a positive number is provided:
{{ 4 | abs }}
4
When a string containing only a number is provided:
{{ "-19.86" | abs }}
19.86
Back to Liquid Reference for 0.11.4
Back to Documentation