Synopsis
PDX_BOOL mth_PointsCollinear(double pts[], long n, int nc, double model_tol, double angle_tol)
Purpose
Check if set of points all lie on a straight line.
Description
This routine checks if an ordered set of points lies on a straight line. The points may be 2D or 3D.
Input
pts
The ordered set of points. (pts) is accessed as a 1D array. The points may have either 2 or 3 coordinates (see (nc)). The first coordinate of the second point is at (pts[nc]).
n
The number of points in (pts).
nc
The number of coordinates per point.
model_tol
The model space point coincidence tolerance
angle_tol
The close to zero angle tolerance
Return
PDX_TRUE if points are collinear; otherwise, PDX_FALSE