mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 11:27:50 +08:00
12 lines
224 B
Go
12 lines
224 B
Go
|
package eval
|
||
|
|
||
|
import "math"
|
||
|
|
||
|
// MathNs contains essential math functions.
|
||
|
var MathNs = NewNs().AddGoFns("math", map[string]interface{}{
|
||
|
"abs": math.Abs,
|
||
|
"ceil": math.Ceil,
|
||
|
"floor": math.Floor,
|
||
|
"round": math.Round,
|
||
|
})
|