]> git.maquefel.me Git - brevno-suite/hugo/commit
tpl/math: Allow variadic math functions to take slice args, add math.Product, math.Sum
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 13 Jun 2023 18:00:00 +0000 (20:00 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2023 18:00:00 +0000 (20:00 +0200)
commit2ba2271e4a3a3222216ed963f913df2f74934aa8
tree933d8ffb536ecb9566c627d07229824f9f5b8a95
parent60a2cdf72db31d746da21ab2e32b6c51830b5fd9
tpl/math: Allow variadic math functions to take slice args, add math.Product, math.Sum

* Update math.Min and math.Max to allow 1 or more args, either scalar or slice, or combination of the two
* Add math.Sum (allow 1 or more args, either scalar or slice, or combination of the two)
* Add math.Product (allow 1 or more args, either scalar or slice, or combination of the two)

Fixes #11030
tpl/math/math.go
tpl/math/math_test.go