operator - method Null safety

Point<T> operator -(
  1. Point<T> other
)

Subtract other from this, as if both points were vectors.

Returns the resulting "vector" as a Point.

Implementation

Point<T> operator -(Point<T> other) {
  return Point<T>((x - other.x) as T, (y - other.y) as T);
}