IntOffset class
A 2D offset with integer coordinates.
This class represents a point in a 2D coordinate system using integer values. It can be used to represent positions, translations, or any other 2D vector with discrete coordinates.
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of the offset.
override
-
translate(
int dx, int dy) → IntOffset - Creates a new IntOffset translated by the given amounts.
Operators
-
operator *(
int scalar) → IntOffset - Multiplies the offset by a scalar value.
-
operator +(
IntOffset other) → IntOffset - Adds two IntOffsets and returns their sum as a new IntOffset.
-
operator -(
IntOffset other) → IntOffset - Subtracts one IntOffset from another and returns their difference.
-
operator ==(
Object other) → bool -
Checks if this offset is equal to another object.
override
-
operator ~/(
int scalar) → IntOffset - Divides the offset by a scalar value using integer division.