raoulb
9d2b5f98d0
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>
2024-07-29 11:05:36 +02:00
Joe Mooring
e40b9fbbcf
tpl/math: Add math.Rand template function
...
Closes #11833
2023-12-29 19:37:27 +01:00
Oleksandr Redko
bda082c98c
tpl: Add math.Abs
...
Fixes #10941 .
2023-05-16 18:32:07 +02:00
Bjørn Erik Pedersen
ce524d0b5e
Add a page template func
...
Fixes #9339
2023-02-25 19:53:18 +01:00
Joe Mooring
b8d5c378ba
tpl: Use consistent delimiter spacing in examples
2022-11-25 09:54:35 +01:00
Bjørn Erik Pedersen
b80853de90
all: gofmt -w -r 'interface{} -> any' .
...
Updates #9687
2022-03-17 22:03:27 +01:00
Bjørn Erik Pedersen
6c70e1f22f
Fix error handling for the time func alias
...
Fixes #8835
2021-08-01 13:39:30 +02:00
Joe Mooring
01758f99b9
Add math.Max and math.Min
...
Closes #8583
2021-05-28 20:38:45 +02:00
Bjørn Erik Pedersen
d90e37e0c6
all: Format code with gofumpt
...
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
Joe Mooring
991934497e
Add math.Pow
...
Closes #7266
2020-05-14 10:00:31 +02:00
Chris Dennis
d184e5059c
tpl: Add math.Sqrt
...
Fixes #6941
2020-02-24 23:45:04 +01:00
Cameron Moore
8a69d23567
tpl: Add math.Ceil, Floor, and Round to method mappings
2017-09-26 08:16:24 +02:00
Artem Sidorenko
34c566773a
tpl/math: Add log function
...
It might be very useful for building tag clouds.
2017-07-03 00:20:48 +02:00
Bjørn Erik Pedersen
d8717cd4c7
all: Update import paths to gohugoio/hugo
2017-06-13 18:42:45 +02:00
Bjørn Erik Pedersen
1f9e8dcc60
tpl: Make the Namespace func signature explicit
...
This makes it cleaner and avoids breaking client code, such as the docs helper JSON generator.
2017-05-20 11:34:38 +03:00
Bjørn Erik Pedersen
690b0f8ff5
tpl: Add docshelper for template funcs
...
And fix some other minor related issues.
Updates #3418
2017-05-01 21:44:15 +02:00
Bjørn Erik Pedersen
eefa0703cb
tpl/math: Make it a package that stands on its own
...
See #3042
2017-05-01 15:13:41 +02:00