68 throw Exception(
"Denominator cannot be 0");
269 throw Exception(
"Denominator cannot be 0");
320 return right == left;
324 return right != left;
336 return right <= left;
340 return right >= left;
T gcd(T a, T b)
Euclid's algorithm to compute the greatest common divisor.
Rational & operator=(const Rational &right)
A simple rational class that holds fractions.
const Rational operator*(const Rational &right) const
bool operator!=(const Rational &right) const
Rational & operator/=(const Rational &right)
Rational & operator-=(const Rational &right)
const Rational operator-(int left, const Rational &right)
bool operator<=(const Rational &right) const
bool operator<(int left, const Rational &right)
const Rational operator*(int left, const Rational &right)
Basic exceptions to throw.
const Rational operator/(const Rational &right) const
bool operator<=(int left, const Rational &right)
bool operator>(const Rational &right) const
bool operator>=(int left, const Rational &right)
bool operator==(const Rational &right) const
Rational & operator+=(const Rational &right)
const Rational operator+(const Rational &right) const
bool operator==(int left, const Rational &right)
static glm::mat4 inverse(const glm::mat4 &m)
const Rational operator/(int left, const Rational &right)
bool operator>(int left, const Rational &right)
Rational & operator*=(const Rational &right)
bool operator!=(int left, const Rational &right)
Rational number implementation.
bool operator>=(const Rational &right) const
const Rational operator+(int left, const Rational &right)
bool operator<(const Rational &right) const
Rational getInverse() const
const Rational operator-() const