Given two points and two vectors, find point of intersection [duplicate]
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: How do you detect where two line segments intersect? Given two points a and b plus two vectors v and u I want to find a third point c , which is the point of intersection in the following manner: vector2 intersection(vector2 a, vector2 v, vector2 b, vector2 u) { float r, s; a + r * v = b + s * u; r * v - s * u = b - a r * v.x - s * u.x = b.x - a.x r * v.y - s * u.y = b.y - a.y } Is there any other way than using