mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 14:40:43 +03:00
parent
322c285ba2
commit
d184e5059c
4 changed files with 68 additions and 1 deletions
|
@ -4,7 +4,7 @@ description: Hugo provides nine mathematical operators in templates.
|
|||
godocref:
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
lastmod: 2020-02-23
|
||||
keywords: [math, operators]
|
||||
categories: [functions]
|
||||
menu:
|
||||
|
@ -36,3 +36,6 @@ aliases: []
|
|||
| `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` |
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue