Circle - Line Intersection not working properly?
问题 I wrote this circle-line intersection detection after http://mathworld.wolfram.com/Circle-LineIntersection.html, but it appears like it or I am missing something. public static bool Intersect (Vector2f CirclePos, float CircleRad, Vector2f Point1, Vector2f Point2) { Vector2f p1 = Vector2f.MemCpy(Point1); Vector2f p2 = Vector2f.MemCpy(Point2); // Normalize points p1.X -= CirclePos.X; p1.Y -= CirclePos.Y; p2.X -= CirclePos.X; p2.Y -= CirclePos.Y; float dx = p2.X - p1.X; float dy = p2.Y - p1.Y;