Skip to content

Commit

Permalink
rollback to keep the concept a point is not a rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
akevalion committed Jun 17, 2020
1 parent b78baa5 commit e33bcad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Geometry/GRectangle.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ GRectangle class >> origin: point1 corner: point2 [
or := (point1 x min: point2 x) , (point1 y min: point2 y).
cor := (point1 x max: point2 x) , (point1 y max: point2 y).

or = cor ifTrue: [ self error: 'This is not a rectangle but a point.' ].

^ self vertices: { or . (cor x , or y). cor. (or x , cor y) }
]

Expand Down

0 comments on commit e33bcad

Please sign in to comment.