mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-15 01:25:00 +02:00
Added namespace builder (#336)
* Added namespace builder * Fixed linting issues * Added extra check * Updated e2e lib * Renamed NamespaceBuilder to NamespaceContainer and changed func receivers * Renamed NewLib to RegisterLib
This commit is contained in:
@ -15,8 +15,8 @@ const (
|
||||
GradToDeg = math.Pi / 200
|
||||
)
|
||||
|
||||
func NewLib() map[string]core.Function {
|
||||
return map[string]core.Function{
|
||||
func RegisterLib(ns core.Namespace) error {
|
||||
return ns.RegisterFunctions(core.Functions{
|
||||
"ABS": Abs,
|
||||
"ACOS": Acos,
|
||||
"ASIN": Asin,
|
||||
@ -50,7 +50,7 @@ func NewLib() map[string]core.Function {
|
||||
"TAN": Tan,
|
||||
"VARIANCE_POPULATION": PopulationVariance,
|
||||
"VARIANCE_SAMPLE": SampleVariance,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func toFloat(arg core.Value) float64 {
|
||||
|
Reference in New Issue
Block a user