Calculate the intersection between two line segments.
Description
This subroutine calculates the intersection point of two line segments
defined by their endpoints (x1, y1) to (x2, y2) and (x3, y3) to (x4, y4).
If the segments intersect, the parameters s and t will contain the
normalized distances along each segment to the intersection point.
The intersection point can be calculated as:
If the segments do not intersect, s and t will be outside
the range [0, 1].
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.