operator == method

  1. @override
bool operator ==(
  1. dynamic other
)
override

Whether other is a point with the same coordinates as this point.

Returns true if other is a Point with x and y coordinates equal to the corresponding coordinates of this point, and false otherwise.

Example:

var result = const Point(0, 0) == const Point(0, 0); // true
result = const Point(1.0, 0) == const Point(-1.0, 0); // false

Implementation

@override
bool operator ==(dynamic other) {
  if (other is Coords) {
    return x == other.x && y == other.y && z == other.z;
  }
  return false;
}