mirror of
https://github.com/prometheus/prometheus
synced 2025-01-12 18:01:36 +00:00
Remove atan2()
Signed-off-by: Levi Harrison <git@leviharrison.dev>
This commit is contained in:
parent
f1d94cc5f6
commit
9fc7ba33aa
@ -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,
|
||||
|
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user