[OSM-dev] Re: [RFC] Beautify scale bar
Tom Carden
tom at tom-carden.co.uk
Sun May 14 13:35:15 BST 2006
On 14/05/06, Jan-Benedict Glaw <jbglaw at lug-owl.de> wrote:
> (One question
> remaining: In C, I would have a macro like
>
> #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])
>
> to get the number of elements in the array. Is there something similar
> in Java to "fix" num_factors?
Arrays have built in length in java - factor.length is what you're
looking for :)
> Additionally, kilometersPerPixel() is
> only used in a meter context, so maybe we'd rename it accordingly and
> drop the factor of 1000 everywhere?)
>
Sure. Or just make a metersPerPixel function too if you need it.
Tom.
More information about the dev
mailing list