manhattanDistanceTo method

double manhattanDistanceTo(
  1. Point other
)

Returns the Manhattan distance to another point.

Implementation

double manhattanDistanceTo(Point other) {
  return (x - other.x).abs() + (y - other.y).abs();
}