Merge commit '346b60358dd8ec2ca228e6635bff9d7914b398b7'

This commit is contained in:
Bjørn Erik Pedersen
2025-01-23 09:47:46 +01:00
384 changed files with 3305 additions and 3271 deletions

View File

@@ -10,8 +10,6 @@ action:
signatures: [math.Abs VALUE]
---
{{< new-in 0.112.0 >}}
```go-html-template
{{ math.Abs -2.1 }} → 2.1
```

View File

@@ -15,14 +15,12 @@ action:
signatures: [math.Add VALUE VALUE...]
---
If one of the numbers is a [`float`], the result is a `float`.
If one of the numbers is a [`float`](g), the result is a `float`.
```go-html-template
{{ add 12 3 2 }} → 17
```
[`float`]: /getting-started/glossary/#float
You can also use the `add` function to concatenate strings.
```go-html-template

View File

@@ -15,10 +15,8 @@ action:
signatures: [math.Div VALUE VALUE...]
---
If one of the numbers is a [`float`], the result is a `float`.
If one of the numbers is a [`float`](g), the result is a `float`.
```go-html-template
{{ div 12 3 2 }} → 2
```
[`float`]: /getting-started/glossary/#float

View File

@@ -15,10 +15,8 @@ action:
signatures: [math.Mul VALUE VALUE...]
---
If one of the numbers is a [`float`], the result is a `float`.
If one of the numbers is a [`float`](g), the result is a `float`.
```go-html-template
{{ mul 12 3 2 }} → 72
```
[`float`]: /getting-started/glossary/#float

View File

@@ -12,13 +12,13 @@ action:
{{< new-in 0.121.2 >}}
The `math.Rand` function returns a pseudo-random number in the [half-open interval] [0.0, 1.0).
The `math.Rand` function returns a pseudo-random number in the half-open [interval](g) [0.0, 1.0).
```go-html-template
{{ math.Rand }} → 0.6312770459590062
```
To generate a random integer in the [closed interval] [0, 5]:
To generate a random integer in the closed interval [0, 5]:
```go-html-template
{{ math.Rand | mul 6 | math.Floor }}
@@ -41,6 +41,3 @@ To generate a random float, with one digit after the decimal point, in the close
```go-html-template
{{ div (math.Rand | mul 50 | math.Ceil) 10 }}
```
[closed interval]: /getting-started/glossary/#interval
[half-open interval]: /getting-started/glossary/#interval

View File

@@ -15,10 +15,8 @@ action:
signatures: [math.Sub VALUE VALUE...]
---
If one of the numbers is a [`float`], the result is a `float`.
If one of the numbers is a [`float`](g), the result is a `float`.
```go-html-template
{{ sub 12 3 2 }} → 7
```
[`float`]: /getting-started/glossary/#float