[Curious] Integer division => fraction

Karl Ramberg karl.ramberg at chello.se
Mon Jun 16 05:44:13 UTC 2003



"Richard A. O'Keefe" wrote:
> 
> Karl Ramberg <karl.ramberg at chello.se> wrote:
>         >Points do not like fractions: why?
> 
> I checked Point out and found that Point seems to be perfectly happy
> with fractions.
> 
> Dan Ingalls <Dan at SqueakLand.org> informs us that
>         There certainly have been times in the past when fractions broke
>         things, most notably in, eg, rectangle and point arguments to BitBlt.
> 
> But then it was >>>BitBlt<<< that didn't like fractions, not Points.
> 
>         A number of years ago I did my best to fix most of these
> 
> That's good to know.  The question remains, is there _any_ way in which
> >>>Point<<< doesn't like Fractions?

I've been looking at this too to recreate what I experienced but I can't 
find any way to recreate the behavior.
I'll get back to this thread as soon as I run into the issue again.

Another issue that cause confusion with points is when you write:
3 at 4 + 5 at 6 =>  a B3DVector3(8.0 9.0 6.0)
This is of course the right answer but not what _I_ expected at all, 
witch is:
(3 at 4) + (5 at 6) => 8 at 10
I guess this is something you have to run into a few times to remember.

Karl



More information about the Squeak-dev mailing list