summaryrefslogtreecommitdiff
path: root/MLKRatio.h
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-29 19:56:21 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-29 19:56:21 +0200
commit9c3236394224167b31eeb402fa78928a0e3eb7fe (patch)
treedc76fdd35091dba953e62e1d737701292bb6f26d /MLKRatio.h
parent5df0d8d27dae228d9568de691ca434194170d1ac (diff)
Add a non-trivial number of arithmetic methods to number classes.
Diffstat (limited to 'MLKRatio.h')
-rw-r--r--MLKRatio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/MLKRatio.h b/MLKRatio.h
index 7d4768b..e2bf06e 100644
--- a/MLKRatio.h
+++ b/MLKRatio.h
@@ -17,6 +17,7 @@
*/
#import "MLKNumber.h"
+#import "MLKInteger.h"
#include <stdarg.h>
#include <stdio.h>
@@ -42,11 +43,19 @@
negative:(BOOL)negative
base:(unsigned int)base;
+-(double) doubleValue;
+
-(MLKNumber *) add:(MLKNumber *)arg;
-(MLKNumber *) subtract:(MLKNumber *)arg;
-(MLKNumber *) multiplyWith:(MLKNumber *)arg;
-(MLKNumber *) divideBy:(MLKNumber *)arg;
+-(NSComparisonResult) compare:(MLKRatio *)arg;
+-(BOOL) isEqual:(id)arg;
+
+-(MLKInteger *) numerator;
+-(MLKInteger *) denominator;
+
-(NSString *) description;
-(NSString *) descriptionWithBase:(int)base;
-(NSString *) descriptionForLisp;