[metapost] Trying to figure out MPLib
taco at elvenkind.com
Sat Aug 4 10:39:48 CEST 2012
On 08/04/2012 02:01 AM, Shriramana Sharma wrote:
> I am guessing if I just do a simple integer division of this by 65536,
> it'll be lossy and so I have to convert to double before I do that
> right? Or would float be enough?
There is not a lot of penalty for double these days, so I would suggest
to use that. And yes, numbers in metapost are typically stored in a
32bit int as 14.16 bits. Better typecast first, divide later, otherwise
you loose the fractional part.
More information about the metapost