22#ifndef COMMON_RATIONAL_H
23#define COMMON_RATIONAL_H
25#include "common/scummsys.h"
26#include "common/frac.h"
68 const Rational operator-(
int right)
const;
69 const Rational operator*(
int right)
const;
70 const Rational operator/(
int right)
const;
72 bool operator==(
const Rational &right)
const;
73 bool operator!=(
const Rational &right)
const;
74 bool operator>(
const Rational &right)
const;
75 bool operator<(
const Rational &right)
const;
76 bool operator>=(
const Rational &right)
const;
77 bool operator<=(
const Rational &right)
const;
79 bool operator==(
int right)
const;
80 bool operator!=(
int right)
const;
81 bool operator>(
int right)
const;
82 bool operator<(
int right)
const;
83 bool operator>=(
int right)
const;
84 bool operator<=(
int right)
const;
90 double toDouble()
const;
93 int getNumerator()
const {
return _num; }
94 int getDenominator()
const {
return _denom; }
96 bool isOne()
const {
return _num == _denom; }
98 void debugPrint(
int debuglevel = 0,
const char *caption =
"Rational:")
const;
99 void debugPrintC(
int debuglevel, uint32 debugChannel,
const char *caption =
"Rational:")
const;
113bool operator==(
int left,
const Rational &right);
114bool operator!=(
int left,
const Rational &right);
115bool operator>(
int left,
const Rational &right);
116bool operator<(
int left,
const Rational &right);
117bool operator>=(
int left,
const Rational &right);
118bool operator<=(
int left,
const Rational &right);
Definition: rational.h:40
int32 frac_t
Definition: frac.h:52
Definition: algorithm.h:29
DBCSString operator+(const DBCSString &x, const DBCSString &y)