Magnitude.st
changeset 699 12f456343eea
parent 530 07d0bce293c9
child 1226 0beea7b0ab4f
--- a/Magnitude.st	Thu Dec 07 22:24:46 1995 +0100
+++ b/Magnitude.st	Thu Dec 07 22:32:39 1995 +0100
@@ -11,10 +11,10 @@
 "
 
 Object subclass:#Magnitude
-       instanceVariableNames:''
-       classVariableNames:''
-       poolDictionaries:''
-       category:'Magnitude-General'
+	 instanceVariableNames:''
+	 classVariableNames:''
+	 poolDictionaries:''
+	 category:'Magnitude-General'
 !
 
 !Magnitude class methodsFor:'documentation'!
@@ -33,10 +33,6 @@
 "
 !
 
-version
-    ^ '$Header: /cvs/stx/stx/libbasic/Magnitude.st,v 1.11 1995-11-11 15:23:55 cg Exp $'
-!
-
 documentation
 "
     This is an abstract class definining common methods for
@@ -46,11 +42,18 @@
 
 !Magnitude methodsFor:'comparing'!
 
-> aMagnitude
+< aMagnitude
     "Compare the receiver with the argument and return true if the
-     receiver is greater than the argument. Otherwise return false."
+     receiver is less than the argument. Otherwise return false."
+
+    ^ (aMagnitude > self)
+!
 
-    ^ self subclassResponsibility
+<= aMagnitude
+    "Compare the receiver with the argument and return true if the
+     receiver is less than or equal to the argument. Otherwise return false."
+
+    ^ (self > aMagnitude) not
 !
 
 = aMagnitude
@@ -60,18 +63,11 @@
     ^ self subclassResponsibility
 !
 
-<= aMagnitude
+> aMagnitude
     "Compare the receiver with the argument and return true if the
-     receiver is less than or equal to the argument. Otherwise return false."
+     receiver is greater than the argument. Otherwise return false."
 
-    ^ (self > aMagnitude) not
-!
-
-< aMagnitude
-    "Compare the receiver with the argument and return true if the
-     receiver is less than the argument. Otherwise return false."
-
-    ^ (aMagnitude > self)
+    ^ self subclassResponsibility
 !
 
 >= aMagnitude
@@ -82,6 +78,20 @@
     ^ (aMagnitude > self) not
 !
 
+max:aMagnitude
+    "return the receiver or the argument, whichever has greater magnitude"
+
+    (self > aMagnitude) ifTrue:[^ self].
+    ^ aMagnitude
+
+    "
+     1 max: 2
+     1 max: 2.0
+     2.0 max: 1.0
+     2.0 max: 2
+    "
+!
+
 min:aMagnitude
     "return the receiver or the argument, whichever has lesser magnitude"
 
@@ -94,20 +104,6 @@
      2.0 min: 1.0
      2.0 min: 2
     "
-!
-
-max:aMagnitude
-    "return the receiver or the argument, whichever has greater magnitude"
-
-    (self > aMagnitude) ifTrue:[^ self].
-    ^ aMagnitude
-
-    "
-     1 max: 2
-     1 max: 2.0
-     2.0 max: 1.0
-     2.0 max: 2
-    "
 ! !
 
 !Magnitude methodsFor:'testing'!
@@ -140,3 +136,9 @@
      (3/2) in:(0 to: 1)
     "
 ! !
+
+!Magnitude class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/Magnitude.st,v 1.12 1995-12-07 21:32:39 cg Exp $'
+! !