Display image on top of the build menu

Started by eduran, February 08, 2014, 08:32:38 AM

Previous topic - Next topic

Grayzzur

Quote from: Flabort on February 11, 2014, 12:19:07 AM
Quote from: Grayzzur on February 10, 2014, 08:02:46 PM
That'll teach you to short-change your decimals instead of using div(64.0 24.0)! :)
Ahah! That's pretty funny, and cool. But you could just as easily use "8.0 3.0 div ->pixOffset" with no accuracy lost :P
True, but 64 and 24 have more meaning. At a scale of 1.0, images display at a size of 24 pixels on a fully zoomed map. In this instance, he's trying to make a 64x64 image display at 64x64. 8/3 and 64/24 are the same mathematically, but 64/24 tells me what I was doing when I'm looking at the code again a week from now.

As for economical, I'd create and store some useful constants like this in variables (like Flabort did there) up in the once/endonce block and use those.
"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker