code: public float DistanceTo(IntPoint anotherPoint) {
          float dx = this.x - anotherPoint.x;
          float dy = this.y - anotherPoint.y;
  
          return (float) Math.sqrt(dx * dx + dy * dy);
      }
docs: Calculate Euclidean distance between two points.
  
  @param anotherPoint Point to calculate distance to.
  @return Euclidean distance between this point and anotherPoint points.