20 import java.util.Vector;
22 import ca.uqac.lif.cep.functions.UnaryFunction;
28 @SuppressWarnings(
"rawtypes")
41 super(Vector.class, Float.class);
45 public Float getValue(Vector v)
47 float x = (Float) v.get(0);
48 float y = (Float) v.get(1);
49 return (
float) Math.atan2((
double) y, (
double) x);
53 public String toString()
ArcTanVector()
Creates a new instance of the function.
Function that calculates the angle of a two-dimensional vector.