Quadrant class
Utility functions for working with quadrants, which are numbered as follows:
1 | 0 --+-- 2 | 3
@version 1.7
Constructors
- Quadrant()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
commonHalfPlane(
int quad1, int quad2) → int - 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.
-
isInHalfPlane(
int quad, int halfPlane) → bool - Returns whether the given quadrant lies within the given halfplane (specified by its right-hand quadrant).
-
isNorthern(
int quad) → bool - Returns true if the given quadrant is 0 or 1.
-
isOpposite(
int quad1, int quad2) → bool - Returns true if the quadrants are 1 and 3, or 2 and 4
-
quadrant(
double dx, double dy) → int - Returns the quadrant of a directed line segment (specified as x and y displacements, which cannot both be 0).
-
quadrantFromCoords(
Coordinate p0, Coordinate p1) → int - Returns the quadrant of a directed line segment from p0 to p1.