ShortFloat.st
branchjv
changeset 18858 2968df243134
parent 18192 32a7c53ef4d0
parent 18852 49601a7aefd8
child 19332 9686fae7951b
--- a/ShortFloat.st	Fri Oct 16 07:01:59 2015 +0200
+++ b/ShortFloat.st	Wed Oct 28 07:44:54 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996 by Claus Gittinger
 	      All Rights Reserved
@@ -247,6 +249,8 @@
 !
 
 coerce:aNumber
+    "convert the argument aNumber into an instance of the receiver's class and return it."
+
     ^ aNumber asShortFloat.
 !
 
@@ -792,7 +796,7 @@
      Do not check for divide by zero (return NaN or Infinity).
      This operation is provided for emulators of other languages/semantics,
      where no exception is raised for these results (i.e. Java).
-     Its only defined if the arguments type is the same as the receivers."
+     It is only defined if the argument's type is the same as the receiver's."
 
 %{  /* NOCONTEXT */
 
@@ -801,21 +805,21 @@
     double dResult, dVal;
 
     if (__isSmallInteger(aNumber)) {
-	result = __shortFloatVal(self) / (float)(__intVal(aNumber));
+        result = __shortFloatVal(self) / (float)(__intVal(aNumber));
 retResult:
-	__qMKSFLOAT(newFloat, result);
-	RETURN ( newFloat );
+        __qMKSFLOAT(newFloat, result);
+        RETURN ( newFloat );
     }
     if (__isShortFloat(aNumber)) {
-	val = __shortFloatVal(aNumber);
-	result = __shortFloatVal(self) / val;
-	goto retResult;
+        val = __shortFloatVal(aNumber);
+        result = __shortFloatVal(self) / val;
+        goto retResult;
     }
     if (__isFloatLike(aNumber)) {
-	dVal = __floatVal(aNumber);
-	dResult = (double) __shortFloatVal(self) / dVal;
-	__qMKFLOAT(newFloat, dResult);
-	RETURN ( newFloat );
+        dVal = __floatVal(aNumber);
+        dResult = (double) __shortFloatVal(self) / dVal;
+        __qMKFLOAT(newFloat, dResult);
+        RETURN ( newFloat );
     }
 %}.
     ^ aNumber quotientFromShortFloat:self
@@ -881,7 +885,7 @@
 !
 
 coerce:aNumber
-    "convert the argument aNumber into an instance of the receivers class and return it."
+    "convert the argument aNumber into an instance of the receiver's class and return it."
 
     ^ aNumber asShortFloat
 !
@@ -1746,7 +1750,7 @@
 !
 
 positive
-    "return true if the receiver is greater or equal to zero
+    "return true if the receiver is greater or equal to zero (not negative)
      0.0 and -0.0 are positive for now."
 
 %{  /* NOCONTEXT */
@@ -2098,11 +2102,11 @@
 !ShortFloat class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.140 2015-03-25 19:18:18 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.140 2015-03-25 19:18:18 cg Exp $'
+    ^ '$Header$'
 ! !