GEMS_2D_Dist_Point_Segment

 

Find the point on the line segment L1-L2 that is closest to the point P.

 

 

Syntax

 

float  GEMS_2D_Dist_Point_Segment(

          Point_2D *P,

          Point_2D *L1,

          Point_2D *L2,

          Point_2D *Pt=NULL

) ;

 

 

Parameters

 

P

Pointer to the coordinate of the 2D point

 

L1

Pointer to the first point of the line segment

 

L2

Pointer to the second point of the line segment

 

Pt

Pointer to a 2D point structure that will contain the coordinate of the closest point to P on the line segment

 

 

Return value

 

This function return the distance between a point and a line segment in a 2D plane.

 

 

Remarks

 

 

 

 

Requirements

 

Header:

          sliceO_include.hpp

 

 

Library:

          sliceO_Structures.lib

 

 

 

Example

 

          ...

 

 

 

          ...

 

 

See also