@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MyRectangle rectangle = (MyRectangle) o;

        return Double.compare(rectangle.h, h) == 0
                && Double.compare(rectangle.r, r) == 0
                && Double.compare(rectangle.w, w) == 0
                && Double.compare(rectangle.x, x) == 0
                && Double.compare(rectangle.y, y) == 0;
    }