summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorOleksandr Redko <Oleksandr_Redko@epam.com>2023-05-16 19:32:07 +0300
committerGitHub <noreply@github.com>2023-05-16 18:32:07 +0200
commitbda082c98c7a0abdb019f12bb21cbaa7b0e8f60e (patch)
tree264dad483cd16238fa1864c7c3f127d4f72d24f4 /docs/content
parent241b21b0fd34d91fccb2ce69874110dceae6f926 (diff)
tpl: Add math.Abs
Fixes #10941.
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/en/functions/math.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/content/en/functions/math.md b/docs/content/en/functions/math.md
index 4abf34d1d..e0222f3b2 100644
--- a/docs/content/en/functions/math.md
+++ b/docs/content/en/functions/math.md
@@ -3,7 +3,7 @@ title: Math
description: Hugo provides mathematical operators in templates.
date: 2017-02-01
publishdate: 2017-02-01
-lastmod: 2023-03-11
+lastmod: 2023-05-15
keywords: [math, operators]
categories: [functions]
menu:
@@ -31,6 +31,7 @@ aliases: []
| | *If one of the numbers is a float, the result is a float.* | `{{ div 6 4.0 }}` &rarr; `1.5` |
| `mod` | Modulus of two integers. | `{{ mod 15 3 }}` &rarr; `0` |
| `modBool` | Boolean of modulus of two integers. Evaluates to `true` if result equals 0. | `{{ modBool 15 3 }}` &rarr; `true` |
+| `math.Abs` | Returns the absolute value of the given number. | `{{ math.Abs -2.1 }}` &rarr; `2.1` |
| `math.Ceil` | Returns the least integer value greater than or equal to the given number. | `{{ math.Ceil 2.1 }}` &rarr; `3` |
| `math.Floor` | Returns the greatest integer value less than or equal to the given number. | `{{ math.Floor 1.9 }}` &rarr; `1` |
| `math.Log` | Returns the natural logarithm of the given number. | `{{ math.Log 42 }}` &rarr; `3.737` |