Point.st
changeset 8452 6f4318707476
parent 8451 a833cbb5e601
child 8791 1171ee15fa9c
--- a/Point.st	Fri Jul 16 15:35:43 2004 +0200
+++ b/Point.st	Fri Jul 16 15:37:16 2004 +0200
@@ -762,6 +762,14 @@
     ^ (x * aPoint x) + (y * aPoint y)
 !
 
+fourNeighbors
+    ^ Array 
+        with: self + (1@0)
+        with: self + (0@1)
+        with: self + (-1@0)
+        with: self + (0@-1)
+!
+
 grid:gridPoint
     "return a new point with coordinates grided (i.e. rounded to the
      nearest point on the grid)"
@@ -1144,7 +1152,7 @@
 !Point class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.66 2004-07-16 13:35:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.67 2004-07-16 13:37:16 cg Exp $'
 ! !
 
 Point initialize!