From 7f7a609d30dbfc9c119bd4567b5ee9b47434fa66 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 26 Jul 2024 03:11:58 +0100 Subject: Introduce normalised value in fraction class Bit of a cheat but it would allow us to do some interesting graphical stuff later. --- src/numerics.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/numerics.hpp') 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); -- cgit v1.2.3-13-gbd6f