So, fixing the problem described in last nights post is not that hard. As pointed out in the comments, I did so and only found one screwy dependency on the behavior, something which had bitten me before and needed to be fixed anyway.
The simple/straightforward solution is to implement the center APIs along the pattern:
topCenter
^origin x + corner x / 2 @ origin y
This will definitely need a comment to say what it does. It'll be something like "return a point along the segment between topCenter and topRight that is equidistant from both". There is a mathematical term for this kind of expression. What if we express that as a method?
ArithmeticValue>>mean: anArithmeticValue
^self + anArithmeticValue / 2
Now we can rewrite our topCenter method as
topCenter
^self topLeft mean: self topRight
We can still put the comment in there, but the code tells the story pretty well on it's own as well. More to follow...