Changeset 53a8e68 for src/libcfa/rational.c
- Timestamp:
- Jul 21, 2017, 3:21:44 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bff227f
- Parents:
- cb43451
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/rational.c
rcb43451 r53a8e68 59 59 void ?{}( Rational(RationalImpl) & r, RationalImpl n, RationalImpl d ) { 60 60 RationalImpl t = simplify( &n, &d ); // simplify 61 r ->numerator = n / t;62 r ->denominator = d / t;61 r.numerator = n / t; 62 r.denominator = d / t; 63 63 } // rational 64 64 … … 78 78 forall( otype RationalImpl | arithmetic( RationalImpl ) ) 79 79 [ RationalImpl, RationalImpl ] ?=?( & [ RationalImpl, RationalImpl ] dest, Rational(RationalImpl) src ) { 80 return *dest = src.[ numerator, denominator ];80 return dest = src.[ numerator, denominator ]; 81 81 } 82 82
Note: See TracChangeset
for help on using the changeset viewer.