Point<T extends num> class

Implemented types


Point(T x, T y)
Point.from(Point<T> p)


hashCode → int
The hash code for this object. [...]
magnitude → double
Get the straight line (Euclidean) distance between the origin (0, 0) and this point.
read-only, override
x ↔ T
read / write, override-getter
y ↔ T
read / write, override-getter
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited


clone() Point<T>
copyFrom(Point<T> point) → void
Copies the coordinates from another Point into this Point.
distanceTo(Point<T> other) → double
Returns the distance between this and other.
offset(T dx, T dy) → void
Offsets this Point by the specified amount.
setTo(T px, T py) → void
Sets the coordinates of this Point to the specified values.
squaredDistanceTo(Point<T> other) → T
Returns the squared distance between this and other. [...]
toString() → String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.


operator *(num factor) Point<T>
Scale this point by factor as if it were a vector. [...]
operator +(Point<T> other) Point<T>
Add other to this, as if both points were vectors. [...]
operator -(Point<T> other) Point<T>
Subtract other from this, as if both points were vectors. [...]
operator ==(Object other) → bool
A Point is only equal to another Point with the same coordinates. [...]

Static Methods

distance(Point<num> p1, Point<num> p2) → num
interpolate(Point<num> p1, Point<num> p2, num f) Point<num>
polar(num len, num angle) Point<num>