--- a/ShortFloat.st Fri Sep 20 09:29:27 1996 +0200
+++ b/ShortFloat.st Sat Sep 21 00:47:48 1996 +0200
@@ -296,10 +296,11 @@
"return an integer with same value - might truncate"
%{ /* NOCONTEXT */
+ float fVal;
- if ((__shortFloatVal(self) >= (float)_MIN_INT)
- && (__shortFloatVal(self) <= (float)_MAX_INT)) {
- RETURN ( __MKSMALLINT( (INT)__shortFloatVal(self)) );
+ fVal = __shortFloatVal(self);
+ if ((fVal >= (float)_MIN_INT) && (fVal <= (float)_MAX_INT)) {
+ RETURN ( __MKSMALLINT( (INT)fVal) );
}
%}.
^ super asInteger
@@ -551,5 +552,5 @@
!ShortFloat class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.8 1996-07-19 10:26:31 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.9 1996-09-20 22:47:48 cg Exp $'
! !