C4 Engine
C4 Engine API Documentation

Calc::SquaredDistancePointToLine

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

float SquaredDistancePointToLine(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 SquaredDistancePointToLine function returns the squared 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::SquaredDistanceLineToLine

Calc::DistancePointToLine

Calc::DistanceLineToLine