function squaredDistance(coord1, coord2) {
  const dx = coord1[0] - coord2[0];
  const dy = coord1[1] - coord2[1];
  return dx * dx + dy * dy;
}
@param {Coordinate} coord1 First coordinate.
@param {Coordinate} coord2 Second coordinate.
@return {number} Squared distance between coord1 and coord2.