摘要:
计算平面上的二条线的交叉点public static int ccw(Point P0, Point P1, Point P2, bool PlusOneOnZeroDegrees) { int dx1, dx2, dy1, dy2; dx1 = P1.X - P0.X; dy1 = P1.Y - P0.Y; dx2 = P2.X - P0.X; dy2 = P2.Y - P0.Y; if (dx1 * dy2 > dy1 * dx2) return +1; if (dx1 * dy2 < dy1 * dx2) return -1; if ((dx1 * dx2 < 0) | 阅读全文