MobilityDB 1.1

◆ parseg2d_intersection()

static int parseg2d_intersection ( const POINT2D  a,
const POINT2D  b,
const POINT2D  c,
const POINT2D  d,
POINT2D p 
)
static

Find the UNIQUE point of intersection p between two closed collinear segments ab and cd.

Return p and a MOBDB_SEG_INTER_TYPE value.

Note
If the segments overlap no point is returned since they can be an infinite number of them.
Precondition
This function is called after verifying that the points are collinear and that their bounding boxes intersect.