nearestIntersection

abstract fun nearestIntersection(start: V, end: V): V

Given a vector (represented as a starting point and an end point), computes the intersection point between the vector and the obstacle nearest to the vector's starting point.

Return

the intersection point between the vector and the rectangle nearest to the vector's starting point

Parameters

start

starting point of the vector

end

ending point of the vector