--- a/Fraction.st Fri Jan 10 19:43:15 1997 +0100
+++ b/Fraction.st Fri Jan 10 19:55:31 1997 +0100
@@ -336,6 +336,24 @@
"Created: 5.11.1996 / 15:15:54 / cg"
!
+asFixedPoint:scale
+ "return the receiver as fixedPoint number, with the given number
+ of post-decimal-point digits."
+
+ ^ FixedPoint numerator:numerator denominator:denominator scale:scale
+
+ "
+ (1/2) asFixedPoint:2
+ (1/3) asFixedPoint:2
+ (1/3) asFixedPoint:5
+ (2/3) asFixedPoint:2
+ (2/3) asFixedPoint:5
+ "
+
+ "Created: 5.11.1996 / 15:15:54 / cg"
+ "Modified: 10.1.1997 / 19:54:50 / cg"
+!
+
asFloat
"return a float with (approximately) my value"
@@ -630,6 +648,6 @@
!Fraction class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Fraction.st,v 1.35 1996-11-05 18:39:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Fraction.st,v 1.36 1997-01-10 18:55:08 cg Exp $'
! !
Fraction initialize!