Offset class final
A 2D offset relative to the top left corner of a coordinate space.
Equality
Two offsets are equal if their x and y coordinates are equal.
Comparison
Offsets are ordered in relation to their x and y coordinates.
That is, an offset in the top-left corner is less than an offset in the bottom-right corner. If two offsets have the same y coordinate, the one with the smaller x coordinate is less, and vice versa.
If both coordinates are different, the offset with the smaller y coordinate is less. If both coordinates are equal, the offsets are equal.
- Implemented types
- Annotations
Constructors
Properties
Methods
-
compareTo(
Offset other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toPair(
) → (int, int) -
Returns a pair
(x, y)
of this offset. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Offset other) → Offset -
Returns this offset incremented by the provided
other
offset. -
operator -(
Offset other) → Offset -
Returns this offset decremented by the provided
other
offset. -
operator ==(
Object other) → bool -
The equality operator.
override