Remove atan2()

Signed-off-by: Levi Harrison <git@leviharrison.dev>
This commit is contained in:
Levi Harrison 2021-08-24 07:28:22 -04:00
parent f1d94cc5f6
commit 9fc7ba33aa
2 changed files with 0 additions and 19 deletions

View File

@ -600,19 +600,6 @@ func funcAtan(vals []parser.Value, args parser.Expressions, enh *EvalNodeHelper)
return simpleFunc(vals, enh, math.Atan)
}
// === atan2(Vector1, Vector2 parser.ValueTypeVector) Vector ===
func funcAtan2(vals []parser.Value, args parser.Expressions, enh *EvalNodeHelper) Vector {
y := vals[0].(Vector)
x := vals[1].(Vector)
for i := 0; i < len(y); i++ {
enh.Out = append(enh.Out, Sample{
Point: Point{V: math.Atan2(y[i].V, x[i].V)},
})
}
return enh.Out
}
// === rad(Vector parser.ValueTypeVector) Vector ===
func funcRad(vals []parser.Value, args parser.Expressions, enh *EvalNodeHelper) Vector {
return simpleFunc(vals, enh, func(v float64) float64 {
@ -1002,7 +989,6 @@ var FunctionCalls = map[string]FunctionCall{
"acos": funcAcos,
"asin": funcAsin,
"atan": funcAtan,
"atan2": funcAtan2,
"avg_over_time": funcAvgOverTime,
"ceil": funcCeil,
"changes": funcChanges,

View File

@ -54,11 +54,6 @@ var Functions = map[string]*Function{
ArgTypes: []ValueType{ValueTypeVector},
ReturnType: ValueTypeVector,
},
"atan2": {
Name: "atan2",
ArgTypes: []ValueType{ValueTypeVector, ValueTypeVector},
ReturnType: ValueTypeVector,
},
"avg_over_time": {
Name: "avg_over_time",
ArgTypes: []ValueType{ValueTypeMatrix},