public static float AngleBetween(this PointF p1, PointF p2) { float dotproduct = p1.Dotproduct(p2); return(dotproduct / p1.Length() / p2.Length()); }