Point<T extends num> class
Represents a 2D coordinate in Euclidean space.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- magnitude → double
-
The magnitude (length) of the vector from the origin (0,0).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- x → T
-
The x-coordinate.
final
- y → T
-
The y-coordinate.
final
Methods
-
distanceTo(
Point< num> other) → double - Computes the exact Euclidean distance to another Point.
-
dotProduct(
Point< num> other) → num - Computes the dot product with another point.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
num scalar) → Point< num> - Multiplies the point by a scalar value.
-
operator +(
Point< num> other) → Point<num> - Adds another point (vector addition).
-
operator -(
Point< num> other) → Point<num> - Subtracts another point (vector subtraction).
-
operator ==(
Object other) → bool -
The equality operator.
override