aboutsummaryrefslogtreecommitdiff
path: root/src/numerics.hpp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-07-26 03:11:58 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-07-26 03:11:58 +0100
commit7f7a609d30dbfc9c119bd4567b5ee9b47434fa66 (patch)
tree010ccfdec2c794aeea3fe3fac8fa4e660ca300ac /src/numerics.hpp
parentf58a7e80ef503af58d8f7bfdc3d64e10717f9bf5 (diff)
downloadcw_tree-7f7a609d30dbfc9c119bd4567b5ee9b47434fa66.tar.gz
cw_tree-7f7a609d30dbfc9c119bd4567b5ee9b47434fa66.tar.bz2
cw_tree-7f7a609d30dbfc9c119bd4567b5ee9b47434fa66.zip
Introduce normalised value in fraction class
Bit of a cheat but it would allow us to do some interesting graphical stuff later.
Diffstat (limited to 'src/numerics.hpp')
-rw-r--r--src/numerics.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/numerics.hpp b/src/numerics.hpp
index c1317cd..43b6c0b 100644
--- a/src/numerics.hpp
+++ b/src/numerics.hpp
@@ -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);