Why does BouncingAtomsMorph fudge bounds

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why does BouncingAtomsMorph fudge bounds

Sean P. DeNigris
Administrator
AtomMorphs take their topLeft as their position. This causes them to bounce past the bottom and right edges of their container by "atom width" and "atom height" respectively.

Then, BouncingAtomsMorph comes to the rescue in #step with:
r _ bounds origin corner: (bounds corner - (8@8)).

Why was this done this way? Was it to make the AtomMorph's method look like more purely like a mathematical formula for a particle? If so, this makes sense, but a comment documenting the intent would be really nice.

Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Why does BouncingAtomsMorph fudge bounds

LawsonEnglish
Why would you expect good documentation for THIS particular morph as
opposed to all the rest?

Not trying to be funny, so much as just pointing out that it is a
well-known issue with virtually all classes in Smalltalk, especially
those that are part of someone's pet project.

L.

On 1/28/12 10:10 PM, Sean P. DeNigris wrote:

> AtomMorphs take their topLeft as their position. This causes them to bounce
> past the bottom and right edges of their container by "atom width" and "atom
> height" respectively.
>
> Then, BouncingAtomsMorph comes to the rescue in #step with:
> r _ bounds origin corner: (bounds corner - (8@8)).
>
> Why was this done this way? Was it to make the AtomMorph's method look like
> more purely like a mathematical formula for a particle? If so, this makes
> sense, but a comment documenting the intent would be really nice.
>
> Sean
>
> --
> View this message in context: http://forum.world.st/Why-does-BouncingAtomsMorph-fudge-bounds-tp4337653p4337653.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>