dst [ 3 ] = -src [ 3 ] ;
}
+// Given a point p, and a line through p0 with direction vector d,
+// find the closest point (p1) on the line
+void sgClosestPointToLine( sgVec3 p1, const sgVec3 p, const sgVec3 p0,
+ const sgVec3 d );
+
+// Given a point p, and a line through p0 with direction vector d,
+// find the closest point (p1) on the line
+void sgdClosestPointToLine( sgdVec3 p1, const sgdVec3 p, const sgdVec3 p0,
+ const sgdVec3 d );
+
// Given a point p, and a line through p0 with direction vector d,
// find the shortest distance (squared) from the point to the line
-double sgPointLineDistSquared( const sgVec3 p, const sgVec3 p0,
- const sgVec3 d );
+double sgClosestPointToLineDistSquared( const sgVec3 p, const sgVec3 p0,
+ const sgVec3 d );
// Given a point p, and a line through p0 with direction vector d,
// find the shortest distance (squared) from the point to the line
-double sgdPointLineDistSquared( const sgdVec3 p, const sgdVec3 p0,
- const sgdVec3 d );
+double sgdClosestPointToLineDistSquared( const sgdVec3 p, const sgdVec3 p0,
+ const sgdVec3 d );
// This is same as
// sgMakeMatTrans4( sgMat4 sgTrans, sgVec3 trans )