Spec-Zone.ru › Dart 2

dart:math

operator - method

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

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

Returns the resulting "vector" as a Point.

Example:

var point = const Point(10, 100) - const Point(10, 10); // Point(0, 90)
point = const Point(-10, -20) - const Point(100, 100); // Point(-110, -120)

Implementation

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

© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.19.6/dart-math/Point/operator_minus.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API