Returns True if p2 is within tol of the infinite line through p1 and p3. If any of the points are coincident, they are also colinear by definition.
colinearPoints? ( p1 As Point, _ p2 As Point, _ p3 As Point, _ Optional tol As Number = 0.001 ) As Boolean
Argument | Type | Description |
---|---|---|
p1 | Point | First point of infinite line. |
p2 | Point | The point to be tested. |
p3 | Point | Second point of infinite line. |
tol | Number | Optional; tolerance for the deviation; default is 0.001. |
Intent >colinearPoints?(Point(0,0,0), Point(1,0,0), Point(2,0,0)) --> True
Intent >colinearPoints?(Point(0,0,0), Point(1,0,0.125), Point(2,0,0)) --> False
Intent >colinearPoints?(Point(0,0,0), Point(1,0,0.125), Point(2,0,0), tol := 0.5) --> TrueUsing the same points as Example 2, but specifying a tolerance.