SquareOfPointToLineSegmentDistance
From Solid Graphics Wiki
| ||||||||||||
The SquareOfPointToLineSegmentDistance function returns square of shortest distance from line segment to point.
float SquareOfPointToLineSegmentDistance
(
const float rkPoint[ 3 ],
const float P0[ 3 ],
const float P1[ 3 ]
);
double SquareOfPointToLineSegmentDistance
(
const double rkPoint[ 3 ],
const double P0[ 3 ],
const double P1[ 3 ]
);
Parameters
| rkPoint | x,y,z coordinates of the point |
| P0 | x,y,z coordinates of first point defining the line segment |
| P1 | x,y,z coordinates of second point defining the line segment |
Return Value
The square of shortest distance from the line segment to the point.
See Also
