7 ms·
In Smalltalk you define points with '@' so you could do... drawRectOrigin: 50@50 extent: 10@21. drawRectOrigin: 50@50 corner: 60@71. If you really wa
by benjComan 13y ago
In Smalltalk you define points with '@' so you could do...
drawRectOrigin: 50@50 extent: 10@21.
drawRectOrigin: 50@50 corner: 60@71.
If you really wanted, on class Point you could define method ',' with parameter 'otherPoint' as follows...
, otherPoint
^ Rectangle origin: self corner: otherPoint.
then you could do draw rectangles like this...
drawRect: (50@50),(60@71).
drawRect: (screenLeft@screenTop),(screenRight@screenBottom).