CGAlgorithmsDD
Implements basic computational geometry algorithms using {link DD} arithmetic.
Value members
Concrete methods
Computes an intersection point between two lines using DD arithmetic. If the lines are parallel (either identical or separate) a null value is returned.
Computes an intersection point between two lines using DD arithmetic. If the lines are parallel (either identical or separate) a null value is returned.
- Value Params
- p1
an endpoint of line segment 1
- p2
an endpoint of line segment 1
- q1
an endpoint of line segment 2
- q2
an endpoint of line segment 2 return an intersection point if one exists, or null if the lines are parallel
Returns the index of the direction of the point <code>q</code> relative to a vector specified by <code>p1-p2</code>.
Returns the index of the direction of the point <code>q</code> relative to a vector specified by <code>p1-p2</code>.
- Value Params
- p1
the origin point of the vector
- p2
the final point of the vector
- q
the point to compute the direction to return 1 if q is counter-clockwise (left) from p1-p2 return -1 if q is clockwise (right) from p1-p2 return 0 if q is collinear with p1-p2