C4 Engine
C4 Engine API Documentation

Calc::DistancePointToLine

Defined in:  C4Computation.h
Calculates the distance from a point to a line.
Prototype

float DistancePointToLine(const Point3D& q, const Point3D& p, const Vector3D& v);

Parameters
q The point q.
p The origin p of the line.
v The direction v of the line.
Description
The DistancePointToLine function returns the perpendicular distance from the point q given by the q parameter to the line p + tv given by the p and v parameters.
See Also

Calc::DistanceLineToLine

Calc::SquaredDistancePointToLine

Calc::SquaredDistanceLineToLine