Previous Up Next

11.16.2  Check if three points are collinear: is_collinear

The is_collinear command is a Boolean function which takes as argument a list or sequence of points.

is_collinear returns 1 if the points are collinear and returns 0 otherwise.
Input:

is_collinear(0,1+i,-1-i)

Output:

1

Input:

is_collinear(i/100, 1+i, -1-i)

Output:

0

Previous Up Next