Vector class
2D Vector.
Note: All vector operations are not available.
Properties
- clone → Vector
-
Clones the vector.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toOffset → Offset
-
Returns an Offset object.
no setter
- toSize → Size
-
Returns a Size object.
no setter
- x ↔ double
-
getter/setter pair
- y ↔ double
-
getter/setter pair
Methods
-
distance(
Vector v2) → double - Returns the euclidean distance between two vectors.
-
dot(
Vector v2) → double - Returns the dot product of two vectors.
-
length(
) → double - Returns the length of the vector.
-
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 *(
double scale) → Vector - Multiplication operator.
-
operator +(
Vector other) → Vector - Addition operator.
-
operator -(
Vector other) → Vector - Subtraction operator.
-
operator /(
double denum) → Vector - Division operator.
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator unary-(
) → Vector - Opposite operator.