diff options
author | Joe Mooring <joe.mooring@veriphor.com> | 2021-05-27 08:34:49 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-05-28 20:38:45 +0200 |
commit | 01758f99b915f34fe7ca4621e4d1ee09efe385b1 (patch) | |
tree | f5f83d15a90fe261e96feb1c676980dabcca1d8e /docs | |
parent | 845a7ba4fc30c61842148d67d31d0fa3db8f40b9 (diff) |
Add math.Max and math.Min
Closes #8583
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/en/functions/math.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/content/en/functions/math.md b/docs/content/en/functions/math.md index 58cc5d5db..99b8cf34f 100644 --- a/docs/content/en/functions/math.md +++ b/docs/content/en/functions/math.md @@ -1,6 +1,6 @@ --- title: Math -description: Hugo provides nine mathematical operators in templates. +description: Hugo provides mathematical operators in templates. godocref: date: 2017-02-01 publishdate: 2017-02-01 @@ -35,7 +35,9 @@ aliases: [] | `modBool` | Boolean of modulus of two integers. Evaluates to `true` if result equals 0. | `{{modBool 15 3}}` → `true` | | `math.Ceil` | Returns the least integer value greater than or equal to the given number. | `{{math.Ceil 2.1}}` → `3` | | `math.Floor` | Returns the greatest integer value less than or equal to the given number. | `{{math.Floor 1.9}}` → `1` | -| `math.Round` | Returns the nearest integer, rounding half away from zero. | `{{math.Round 1.5}}` → `2` | | `math.Log` | Returns the natural logarithm of the given number. | `{{math.Log 42}}` → `3.737` | -| `math.Sqrt` | Returns the square root of the given number. | `{{math.Sqrt 81}}` → `9` | +| `math.Max` | Returns the greater of two numbers. | `{{math.Max 1 2}}` → `2` | +| `math.Min` | Returns the smaller of two numbers. | `{{math.Min 1 2}}` → `1` | | `math.Pow` | Returns the first number raised to the power of the second number. | `{{math.Pow 2 3}}` → `8` | +| `math.Round` | Returns the nearest integer, rounding half away from zero. | `{{math.Round 1.5}}` → `2` | +| `math.Sqrt` | Returns the square root of the given number. | `{{math.Sqrt 81}}` → `9` | |