Calculates the angle of a vector.