There was an error while loading. Please reload this page.
1 parent d9697e2 commit 8a69d23Copy full SHA for 8a69d23
tpl/math/init.go
@@ -36,13 +36,27 @@ func init() {
36
},
37
)
38
39
+ ns.AddMethodMapping(ctx.Ceil,
40
+ nil,
41
+ [][2]string{
42
+ {"{{math.Ceil 2.1}}", "3"},
43
+ },
44
+ )
45
+
46
ns.AddMethodMapping(ctx.Div,
47
[]string{"div"},
48
[][2]string{
49
{"{{div 6 3}}", "2"},
50
51
52
53
+ ns.AddMethodMapping(ctx.Floor,
54
55
56
+ {"{{math.Floor 1.9}}", "1"},
57
58
59
60
ns.AddMethodMapping(ctx.Log,
61
nil,
62
@@ -71,6 +85,13 @@ func init() {
71
85
72
86
73
87
88
+ ns.AddMethodMapping(ctx.Round,
89
90
91
+ {"{{math.Round 1.5}}", "2"},
92
93
94
74
95
ns.AddMethodMapping(ctx.Sub,
75
96
[]string{"sub"},
76
97
0 commit comments