Rectangle r = new Rectangle(rect); scale(r);  return r;
return (int) Math.rint(val * ratio);
    public Rectangle scaled (Rectangle rect)    {        Rectangle r = new Rectangle(rect);        scale(r);        return r;    }