"Nathan Beckmann" <[EMAIL PROTECTED]> wrote: > - y = (UINT)(((REAL)y) * ((REAL)GetDeviceCaps(hdcref, LOGPIXELSY)) / > - ((REAL)INCH_HIMETRIC)); > + /* this calculation can lead to truncation error */ > + y = (UINT)((((REAL)y) * ((REAL)GetDeviceCaps(hdcref, LOGPIXELSY)) / > + ((REAL)INCH_HIMETRIC)) + 0.5);
Using MulDiv instead should be a more appropriate fix here. -- Dmitry.
