[BUG][FIX] Point>>reciprocal

Boris Gaertner Boris.Gaertner at gmx.net
Thu Jun 3 09:27:10 UTC 2004


This was posted by Trygve Reenskaug earlier today.
I did only the postprocessing that is needed to bring this fix
into our Bug fix archive viewer (BFAV).

We can easily include this method, there is no reason
for not doing it. There is however a situation
when it is erhaps better not to use Float>reciprocal.
Look at  WindowingTransformation>>applyInverseTo:,
where we read:

transformedObject scaleBy: 1.0 / scale x @ (1.0 / scale y)

This is not the same as  scale reciprocal: The expression
1.0 / scale x @ (1.0 / scale y)
ensures that we obtain a point with Floats as its coordinates.
Point>>reciprocal  does not introduce Floats for receiver
coordinates that are not already Floats. This is an
issue for the implementation of a fast windowing
transformation.
----------------------
Greetings, Boris

 "Trygve Reenskaug" <trygver at ifi.uio.no> wrote:
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Wednesday, March 10, 2004 10:51 AM
Subject: [BUGFIX] Point>>reciprocal


> I have a simple Morph structure:
>        SlideRM(BorderedMorph)
>           TransformMorphRM(TransformMorph)
>               SlideInnerRM(PasteUpMorph)
> The Transform scale was aPoint. I got error when computing the inverse
> transform because Point does not understand reciprocal, see attached bug
> report.
>
> A simple fix could be a new method to Point:
>
>     reciprocal
>        " Answer a Point with coordinates that are the reciprocals of mine.
"
>        " Method was missing from release. "
>        " 20040301 20:50:35 TRee(Squeak3.6-5429-tree07.38) "
>
>        ^ x reciprocal @ y reciprocal.
>
> --Trygve
>
> --
>
> Trygve Reenskaug      mailto: trygver at ifi.uio.no
> Morgedalsvn. 5A       http://heim.ifi.uio.no/~trygver
> N-0378 Oslo           Tel: (+47) 22 49 57 27
> Norway
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Point-reciprocal-TRee.cs
Type: application/octet-stream
Size: 510 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040603/eb05aaf4/Point-reciprocal-TRee.obj


More information about the Squeak-dev mailing list