Point<T extends num> class
A utility class for representing two-dimensional positions.
Constructors
- Point(T x, T y) const
- Creates a point with the provided
xandycoordinates.
Properties
- hashCode → int read-only, override
- The hash code for this object. [...]
- magnitude → double read-only
- Get the straight line (Euclidean) distance between the origin (0, 0) and this point.
- runtimeType → Type read-only, inherited
- A representation of the runtime type of the object.
- x → T final
- y → T final
Methods
- distanceTo(
Point< T> other) → double - Returns the distance between
thisandother. - noSuchMethod(
Invocation invocation) → dynamic inherited - Invoked when a non-existent method or property is accessed. [...]
- squaredDistanceTo(
Point< T> other) → T - Returns the squared distance between
thisandother. [...] - toString(
) → String override - A string representation of this object. [...]
Operators
- operator *(
num factor) → Point< T> - Scale this point by
factoras if it were a vector. [...] - operator +(
Point< T> other) → Point<T> - Add
othertothis, as if both points were vectors. [...] - operator -(
Point< T> other) → Point<T> - Subtract
otherfromthis, as if both points were vectors. [...] - operator ==(
Object other) → bool override - Whether
otheris a point with the same coordinates as this point. [...]
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-math/Point-class.html