mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
math: Add trigonometric functions and some angle helper functions
This commit adds these new template functions in the `math` namespace: math.Acos math.Asin math.Atan math.Atan2 math.Cos math.Pi math.Sin math.Tan math.ToDegrees math.ToRadians Co-authored-by: Joe Mooring <joe@mooring.com>
This commit is contained in:
24
docs/content/en/functions/math/Pi.md
Normal file
24
docs/content/en/functions/math/Pi.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: math.Pi
|
||||
description: Returns the mathematical constant pi.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
aliases: []
|
||||
related:
|
||||
- functions/math/Sin
|
||||
- functions/math/Cos
|
||||
- functions/math/Tan
|
||||
- functions/math/Asin
|
||||
- functions/math/Acos
|
||||
- functions/math/Atan
|
||||
- functions/math/Atan2
|
||||
returnType: float64
|
||||
signatures: [math.Pi]
|
||||
---
|
||||
|
||||
{{< new-in 0.130.0 >}}
|
||||
|
||||
```go-html-template
|
||||
{{ math.Pi }} → 3.141592653589793
|
||||
```
|
Reference in New Issue
Block a user