public bool OnLeft(PointF p) { var ab = new PointF(B.X - A.X, B.Y - A.Y); var ap = new PointF(p.X - A.X, p.Y - A.Y); return(ab.Det(ap) >= 0); }