mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
temporal: add operator== and operator!= for ratio_t
This commit is contained in:
parent
43f58f88a6
commit
2d24bcdf4a
1 changed files with 8 additions and 0 deletions
|
|
@ -78,6 +78,14 @@ class _ratio_t {
|
||||||
|
|
||||||
double to_double() const { return (double) _numerator / _denominator; };
|
double to_double() const { return (double) _numerator / _denominator; };
|
||||||
|
|
||||||
|
bool operator== (_ratio_t<T> const & other) const {
|
||||||
|
return _numerator == other._numerator && _denominator == other._denominator;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator!= (_ratio_t<T> const & other) const {
|
||||||
|
return _numerator != other._numerator || _denominator != other._denominator;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T _numerator;
|
T _numerator;
|
||||||
T _denominator;
|
T _denominator;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue