Farthest crossing of a ray from a point with a closed polygon.
Polygon [x, z].
[x, z]
Ray origin.
Ray direction, the polar angle from +x toward +z.
Distance along the ray, 0 when it meets nothing.
Farthest crossing of a ray from a point with a closed polygon.