+ updated version to 0.1.07

This commit is contained in:
rob tillaart 2015-03-05 18:26:06 +01:00
parent f6ef1714c2
commit bb3198d47d
2 changed files with 9 additions and 8 deletions

View File

@ -1,7 +1,7 @@
//
// FILE: fraction.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.06
// VERSION: 0.1.07
// PURPOSE: library for fractions for Arduino
// URL:
//
@ -11,6 +11,7 @@
// - divide by zero errors
// - test extensively
//
// 0.1.07 - major refactoring by Chris-A
// 0.1.06 - added proper(), mediant(), angle();
// 0.1.05 - tested negative Fractions math, added constructors,
// minor refactoring,
@ -162,7 +163,7 @@ Fraction& Fraction::operator += (const Fraction &c)
d *= c.d;
}
simplify();
return *this;
return *this;
}
Fraction& Fraction::operator -= (const Fraction &c)
@ -177,7 +178,7 @@ Fraction& Fraction::operator -= (const Fraction &c)
d *= c.d;
}
simplify();
return *this;
return *this;
}
Fraction& Fraction::operator *= (const Fraction &c)
@ -185,7 +186,7 @@ Fraction& Fraction::operator *= (const Fraction &c)
n *= c.n;
d *= c.d;
simplify();
return *this;
return *this;
}
Fraction& Fraction::operator /= (const Fraction &c)
@ -194,7 +195,7 @@ Fraction& Fraction::operator /= (const Fraction &c)
n *= c.d;
d *= c.n;
simplify();
return *this;
return *this;
}
double Fraction::toDouble()

View File

@ -1,7 +1,7 @@
//
// FILE: fraction.h
// AUTHOR: Rob Tillaart
// VERSION: 0.1.06
// VERSION: 0.1.07
// PURPOSE: demo library for fractions for Arduino
// URL:
//
@ -13,7 +13,7 @@
#include "Arduino.h"
#define FRACTIONLIBVERSION "0.1.06"
#define FRACTIONLIBVERSION "0.1.07"
class Fraction: public Printable
{
@ -26,7 +26,7 @@ public:
Fraction(uint32_t p) : n(p), d(1) {}
Fraction(uint16_t p) : n(p), d(1) {}
Fraction(uint8_t p) : n(p), d(1) {}
Fraction(const Fraction &f) : n(f.n), d(f.d) {}
Fraction(const Fraction &f) : n(f.n), d(f.d) {}
size_t printTo(Print& p) const;