code: public static int distanceSq (int x1, int y1, int x2, int y2) {
          x2 -= x1;
          y2 -= y1;
          return x2 * x2 + y2 * y2;
      }
docs: Returns the squared Euclidian distance between the specified two points.