public double angle(Vector2D v) { return Angle.diff(v.angle(), angle()); }
/** * Returns the unoriented smallest angle between two vectors. * The computed angle will be in the range [0, Pi). * * @param tip1 the tip of one vector * @param tail the tail of each vector * @param tip2 the tip of the other vector * @return the angle between tail-tip1 and tail-tip2 */ public static double angleBetween(Coordinate tip1, Coordinate tail, Coordinate tip2) { double a1 = angle(tail, tip1); double a2 = angle(tail, tip2); return diff(a1, a2); }