On Wed, 2013-08-21 at 02:00 +0200, Krzysztof KosiĆski wrote:
p0[X] = inches_from_pixels(p0[X]);
What concerns me about this syntax is that it's a many 2 many implication; i.e that there might be other calls like feet_from_rods available to them.
It's possible that to and from pixel conversion is really the standard and there we have a one to many two way concept that should just be 'p = from_inches( i )' and 'i = to_inches( p )'. I understand why explicitly stating pixels is attractive but it gives off the wrong impression.
Then I don't /like/ saying any units in the code at all. If we're specifying units for non-default-in-file-format code, then something might be amiss. Although I haven't studied the code well enough to work out why we're converting to inches here anyway.
Martin,
P.S. Lay off complaining about double colons, namespacing can be used for good as well as evil.