Introduce normalised value in fraction class

Bit of a cheat but it would allow us to do some interesting graphical
stuff later.
This commit is contained in:
2024-07-26 03:11:58 +01:00
parent f58a7e80ef
commit 7f7a609d30
2 changed files with 6 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ typedef uint64_t word_t;
struct Fraction
{
word_t numerator, denominator;
long double norm;
Fraction(word_t numerator = 0, word_t denominator = 1);
bool operator<(const Fraction other);