From bb3198d47d6db470df86ca1e49b6fa8416ee64da Mon Sep 17 00:00:00 2001 From: rob tillaart Date: Thu, 5 Mar 2015 18:26:06 +0100 Subject: [PATCH] + updated version to 0.1.07 --- libraries/Fraction/fraction.cpp | 11 ++++++----- libraries/Fraction/fraction.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libraries/Fraction/fraction.cpp b/libraries/Fraction/fraction.cpp index 37d75936..f57d5255 100644 --- a/libraries/Fraction/fraction.cpp +++ b/libraries/Fraction/fraction.cpp @@ -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() diff --git a/libraries/Fraction/fraction.h b/libraries/Fraction/fraction.h index 7df8fea7..2e59d965 100644 --- a/libraries/Fraction/fraction.h +++ b/libraries/Fraction/fraction.h @@ -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;