Returns the quadrant of a directed line segment from p0 to p1.
Throws:
IllegalArgumentException - IllegalArgumentException if the points are equal
publicstatic boolean isOpposite(int quad1, int quad2)
Returns true if the quadrants are 1 and 3, or 2 and 4
publicstatic int commonHalfPlane(int quad1, int quad2)
Returns the right-hand quadrant of the halfplane defined by the two quadrants, or -1 if the quadrants are opposite, or the quadrant if they are identical.
publicstatic boolean isInHalfPlane(int quad, int halfPlane)
Returns whether the given quadrant lies within the given halfplane (specified by its right-hand quadrant).