Point package:gloss
A point on the x-y plane.
Test whether a point lies within a rectangular box that is oriented on
the x-y plane. The points P1-P2 are opposing points of the box, but
need not be in a particular order.
P2 +-------+
| |
| + P0 |
| |
+-------+ P1
Given an infinite line which intersects P1 and P1,
return the point on that line that is closest to P3
Given an infinite line which intersects P1 and P2, let P4 be the point
on the line that is closest to P3.
Return an indication of where on the line P4 is relative to P1 and P2.
if P4 == P1 then 0
if P4 == P2 then 1
if P4 is halfway between P1 and P2 then 0.5
|
P1
|
P4 +---- P3
|
P2
|