Yes, in theory. So 559 is the bead seat diameter, 40 is the tire diameter (the section of the tire, that is). So the overall diameter of the wheel, with a 559-40 tire on it, is 559+40+40=638. That will usually be pretty close to the actual diameter of the wheel.
Note there are two different diameters: the wheel (rim), and the tire thickness. If you bend a fender out to make it fit a bigger wheel diameter, it will become narrower. If you bend it in, to make it fit a smaller wheel, it will get wider.
Actually that's not true ...
I believe that the OP is referring to the ETRTO (ISO-5775), which lists width of a tyre and the diameter of the wheel (see Figure 1).
https://en.wikipedia.org/wiki/ISO_5775