0> In article <20100208071528.ga11...@x60s>, 0> Marko Mäkelä <URL:mailto:[email protected]> ("Marko") wrote:
Marko> An integer version of your formula would also work in this case: Marko> Marko> int len = (off * 6 + 7) / 8 = 43/8 = 5.375 = 5 Marko> Marko> This formula is clear to me: it will clearly convert the "off" Marko> 6-byte chars (including the end-of-string code) to the number of Marko> required 8-bit octets. I'm with Marko here - this integer version is both computationally efficient and clear in its intent. That's the standard idiom for rounded-up division. _______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
