I don't really know how to explain it, since I haven't used the tessellator myself, however I can tell you that U and V just tells you where the sprite is on the main sprite sheet. Or something like that? Maybe someone who has more experience with this type of work can explain it better than me?
Basically a difference in code style.
You can use hard-coded numbers if you want.
But if you happen to read this code line two months from now, you'll waste time checking which is what.
Also easier to mass-replace a method than a single value when updating.
Finally, if you use this code in a place where you don't have control of the implementation of icon, there is a slight change hard-coded numbers won't work, depending on the icon instance.
What icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight() are doing in this line?
Whats the difference between this and having numbers there?
Be sure to quote my post if you want a reply.
lol @ Cameronazzi copy-pasting my sig into his
You can use hard-coded numbers if you want.
But if you happen to read this code line two months from now, you'll waste time checking which is what.
Also easier to mass-replace a method than a single value when updating.
Finally, if you use this code in a place where you don't have control of the implementation of icon, there is a slight change hard-coded numbers won't work, depending on the icon instance.