From: Jesper Skov (jskov@zoftcorp.dk)
Date: Fri Sep 05 2003 - 15:23:53 EDT
I'm pretty sure the C/C++ language defines both multiply and division
operators as left-to-right ordered, so it really shouldn't make a
difference.
Jesper
On Fri, 2003-09-05 at 17:43, msevior@physics.unimelb.edu.au wrote:
> CVS: ----------------------------------------------------------------------
> CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
> CVS:
> CVS: Committing in .
> CVS:
> CVS: Modified Files:
> CVS: xp/gr_Graphics.cpp
> CVS: ----------------------------------------------------------------------
> Explicit casting and calculations of ratios in the graphics class. Unix
> build continues to be fine. This *might* fix cursor problems on windows.
>
> There were a few examples of code like this:
>
> j * k /m
>
> Where everything is integer. Now if the compiler decides to divide k/m
> before multipling by j we would have lost resolution. (Since the division
> would truncate on conversion to integer, before the multiplication.)
>
> I put in a bunch of casts to force the compiler to always calcuate at
> higher resolution.
>
> This might fix the cursor and page number changing with zoom on windows.
> Windows developers please test and post your findings to the list. I won't
> be able to actually compile windows for a while I think but I would like
> to move on to fixing other bugs. So let me know if it's fixe dor still
> broken.
>
> Cheers
>
> Martin
-- If you're a spammer, knock yourself out - send me all your junk mail to asktobeblocked@zoftcorp.dk
This archive was generated by hypermail 2.1.4 : Fri Sep 05 2003 - 15:36:41 EDT