CL_LineMath::intersects - ClanLib Game SDK

Home | All Classes | Grouped Classes | Index | Search

# CL_LineMath::intersects

Return true if two line segments intersect.

    	bool intersects(
    		float* lineA, float* lineB, bool collinear_intersect=false);

Parameters:

float *lineA
  First line. Pointer to float array with elements {x1,y1,x2,y2}.
float *lineB
  Second line. Pointer to float array with elements {x1,y1,x2,y2}.
bool collinear_intersect
  set if a collision is reported when all points are on the same line.

See also:

CL_LineMath

Questions or comments, write to the ClanLib mailing list.