diff options
author | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-07-06 23:53:04 +0200 |
---|---|---|
committer | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-07-06 23:53:04 +0200 |
commit | 26a11662d6d371a1d0c44de6bb028a1523ba4dc5 (patch) | |
tree | 9532f796a01ba5b3000d3e5bd6062c59f2a934b6 /MLKRatio.m | |
parent | bb79a71e7aa85536d3d60d50913d5fc39c4ac07b (diff) |
Add class MLKNumber, unify arithmetic interface.
Diffstat (limited to 'MLKRatio.m')
-rw-r--r-- | MLKRatio.m | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -71,11 +71,12 @@ base:base]); } -#define DEFINE_MPQ_TWOARG_OPERATION(SELECTOR, GMPFUN) \ - DEFINE_GMP_OPERATION (SELECTOR (MLKRatio *)arg, \ - mpq, \ - GMPFUN (mpval, self->value, arg->value), \ - MLKRatio, \ +#define DEFINE_MPQ_TWOARG_OPERATION(SELECTOR, GMPFUN) \ + DEFINE_GMP_OPERATION (SELECTOR (MLKNumber *)arg, \ + mpq, \ + GMPFUN (mpval, self->value, ((MLKRatio*)arg)->value), \ + MLKNumber, \ + MLKRatio, \ ratioWithMPQ:) DEFINE_MPQ_TWOARG_OPERATION (add:, mpq_add) |