--- a/ShortFloat.st Thu Oct 30 16:03:31 2003 +0100
+++ b/ShortFloat.st Thu Oct 30 16:06:08 2003 +0100
@@ -580,6 +580,28 @@
^ aNumber quotientFromShortFloat:self
!
+abs
+ "return the absolute value of the receiver
+ reimplemented here for speed"
+
+%{ /* NOCONTEXT */
+
+ OBJ newFloat;
+ float val = __shortFloatVal(self);
+
+ if (val < 0.0) {
+ __qMKSFLOAT(newFloat, -val);
+ RETURN ( newFloat );
+ }
+ RETURN (self);
+%}.
+
+ "
+ 3.0 asShortFloat abs
+ -3.0 asShortFloat abs
+ "
+!
+
negated
"return myself negated"
@@ -1456,5 +1478,5 @@
!ShortFloat class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.81 2003-07-02 09:52:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.82 2003-10-30 15:06:08 stefan Exp $'
! !