This commit is contained in:
17
include/NR.h
17
include/NR.h
@@ -3,17 +3,20 @@
|
||||
#include <iostream>
|
||||
|
||||
class NR {
|
||||
public:
|
||||
using Int = long long;
|
||||
|
||||
private:
|
||||
int m_Numerator;
|
||||
int m_Denominator; // has to be > 0, sign is carried by the numerator
|
||||
Int m_Numerator;
|
||||
Int m_Denominator; // has to be > 0, sign is carried by the numerator
|
||||
|
||||
public:
|
||||
NR();
|
||||
NR(int entier);
|
||||
NR(int numerator, int denominator); // check if denominator != 0
|
||||
NR(Int entier);
|
||||
NR(Int numerator, Int denominator); // check if denominator != 0
|
||||
|
||||
int GetNumerator() const;
|
||||
int GetDenominator() const;
|
||||
Int GetNumerator() const;
|
||||
Int GetDenominator() const;
|
||||
|
||||
bool operator==(const NR& opNR) const;
|
||||
bool operator<(const NR& opNR) const;
|
||||
@@ -43,5 +46,3 @@ class NR {
|
||||
private:
|
||||
void Reduce();
|
||||
};
|
||||
|
||||
int PGCD(int x, int y);
|
||||
|
||||
Reference in New Issue
Block a user