tpl/math: Add math.Rand template function

Closes #11833
This commit is contained in:
Joe Mooring
2023-12-28 14:25:29 -08:00
committed by Bjørn Erik Pedersen
parent 9cd8fbb332
commit e40b9fbbcf
5 changed files with 71 additions and 6 deletions

View File

@@ -115,6 +115,13 @@ func init() {
},
)
ns.AddMethodMapping(ctx.Rand,
nil,
[][2]string{
{"{{ math.Rand }}", "0.6312770459590062"},
},
)
ns.AddMethodMapping(ctx.Round,
nil,
[][2]string{