torchsig.utils.coordinate_system.line_intersection

torchsig.utils.coordinate_system.line_intersection(a: Coordinate, b: Coordinate, c: Coordinate, d: Coordinate) bool[source]

Check if the line segments AB and CD intersect.

Uses the counter-clockwise orientation test.

Parameters:
Returns:

True if segments AB and CD intersect.

Return type:

bool