operator == method

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

Compares coordinates for equality.

Implementation

@override
bool operator ==(Object other)
{
  if (other is Coordinate) {
    return this.x == other.x && this.y == other.y;
  }
  else {
    return false;
  }
}