Thanks andre Igor I'm sure that we can understand the implementation of area. I asked andre to post it because I was concerned that this difference of behavior is a bit odd. And I wanted to raise awareness and may be that we question ourselves. Now I do not have that much preconceived point of view on it. Stef
Hello,
VW: (Rectangle origin: (0@0) corner: (10@10)) area. 100 (Rectangle origin: (0@10) corner: (10@0)) area. -100 (Rectangle origin: (10@10) corner: (0@0)) area. 100 (Rectangle origin: (10@0) corner: (0@10)) area. -100
Pharo: (Rectangle origin: (0@0) corner: (10@10)) area. 100 (Rectangle origin: (0@10) corner: (10@0)) area. 0 (Rectangle origin: (10@10) corner: (0@0)) area. 0 (Rectangle origin: (10@0) corner: (0@10)) area. 0
On Wed, Apr 6, 2011 at 1:05 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: Give us the code! In VW and Pharo side by side and their results
Stef
On Apr 6, 2011, at 10:31 AM, Andre Hora wrote:
Hello,
To create a Rectangle in Pharo with the method Rectangle>>origin:corner:, you must provide the top left and the bottom right points. With others you have a Rectangle with area equals to zero. I just noticed that in VW it is possible create a Rectangle with other points (bottom right and top left, bottom left and top right, ...). So, shouldn't Pharo Rectangle allow the same?
regards,
-- Andre Hora
-- Andre Hora