# Synopsis

int mth_CheckColin(int ndim, double tol, double *p1, double *p2, double *p3)

# Purpose

Determine if three points are colinear.

# Description

The three specified points will be checked for colinearity by computing the area of the triangle represented by the three points. This area will then be compared to tol to determine if the points are colinear. If the points are widely spaced, tol should be adjusted to compensate. The ordering of the points is not significant, however, none of the points may be coincident.

# Input

## ndim

Number of dimensions in vectors (must be 2 or 3)

## tol

Minimum triangle area to be considered non-zero

## p1

First point

## p2

Second point

## p3

Third point

# Return

          0 - Points are not colinear
          1 - Points are colinear
          .fi