Function VectorMath.LineRayIntersectionFactorXZ

LineRayIntersectionFactorXZ (Int3 start1, Int3 end1, Int3 start2, Int3 end2)

Returns the intersection factor for line 1 with ray 2.

Public Static
float LineRayIntersectionFactorXZ (

Int3

start1

Int3

end1

Int3

start2

Int3

end2

)

Returns the intersection factor for line 1 with ray 2.

The intersection factors is a factor distance along the line start - end where the other line intersects it.
intersectionPoint = start1 + factor * (end1-start1)
Lines are treated as infinite.
The second "line" is treated as a ray, meaning only matches on start2 or forwards towards end2 (and beyond) will be returned If the point lies on the wrong side of the ray start, Nan will be returned.

NaN is returned if the lines are parallel.