Revert gcd, too hasty in testing.

This commit is contained in:
Chris--A 2015-03-05 18:29:58 +10:00
parent 5379f830b1
commit e0c33bf44d
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ Fraction Fraction::setDenominator(const Fraction &a, uint16_t b)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// PRIVATE // PRIVATE
// http://en.wikipedia.org/wiki/Binary_GCD_algorithm // http://en.wikipedia.org/wiki/Binary_GCD_algorithm
int32_t& Fraction::gcd(int32_t &a , int32_t &b) int32_t Fraction::gcd(int32_t a , int32_t b)
{ {
long c; long c;
while ( a != 0 ) while ( a != 0 )

View File

@ -64,7 +64,7 @@ public:
protected: protected:
void simplify(); void simplify();
double fractionize(double); double fractionize(double);
int32_t& gcd(int32_t&, int32_t&); int32_t gcd(int32_t, int32_t);
int32_t n; int32_t n;
int32_t d; int32_t d;