示例#1
0
 public float DistanceTo(Point2f p)
 {
     return((float)Math.Sqrt((p.x - x) * (p.x - x) + (p.y - y) * (p.y - y)));
 }
示例#2
0
 public bool intersects(Point2f p1, Point2f p2, Point2f p3)
 {
     return(intersectsLine(p1.x, p1.y, p2.x, p2.y) ||
            intersectsLine(p2.x, p2.y, p3.x, p3.y) ||
            intersectsLine(p3.x, p3.y, p1.x, p1.y));
 }