Point.st
changeset 10882 2f7bb692f56d
parent 10559 f6a5f339f072
child 11404 87bebe147067
--- a/Point.st	Thu Feb 28 13:32:30 2008 +0100
+++ b/Point.st	Fri Feb 29 09:45:31 2008 +0100
@@ -400,6 +400,17 @@
 
 !
 
+isLeftOrAbove:aPoint
+    "return true if the receiver is above or to the left
+     of the argument, aPoint.
+     When sorting this enumerates points from left to right and top to bottom"
+
+    |p|
+
+    p := aPoint asPoint.
+    ^ (y < p y) or:[(y = p y) and:[x < p x]]
+!
+
 max:aPoint
     "return the lower right corner of the rectangle uniquely defined by
      the receiver and the argument, aPoint"
@@ -1171,7 +1182,7 @@
 !Point class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.70 2007-05-29 10:17:04 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.71 2008-02-29 08:45:31 stefan Exp $'
 ! !
 
 Point initialize!