diff --git a/baslib/math.go b/baslib/math.go index 67f4b53..04f9b34 100644 --- a/baslib/math.go +++ b/baslib/math.go @@ -24,6 +24,6 @@ func Atn(x float64) float64 { return math.Atan(x) } -func Sqrt(v float64) float64 { +func Sqr(v float64) float64 { return math.Sqrt(v) } diff --git a/node/exp.go b/node/exp.go index ceab832..7227dc4 100644 --- a/node/exp.go +++ b/node/exp.go @@ -1542,7 +1542,7 @@ func (e *NodeExpSqr) String() string { // Exp returns value func (e *NodeExpSqr) Exp(options *BuildOptions) string { //return "math.Sqrt(" + forceFloat(options, e.Value) + ")" - return "baslib.Sqrt(" + forceFloat(options, e.Value) + ")" + return "baslib.Sqr(" + forceFloat(options, e.Value) + ")" } // FindUsedVars finds used vars