W3cubDocs

/Dart 2

operator - method

Point<T> operator - (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, y - other.y);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-math/Point/operator_minus.html