fix Beats::operator-()
This commit is contained in:
parent
e4e035c6e2
commit
70e27e0bf2
|
@ -228,7 +228,14 @@ public:
|
|||
}
|
||||
|
||||
Beats operator-() const {
|
||||
return Beats(-_beats, -_ticks);
|
||||
/* must avoid normalization here, which will convert a negative
|
||||
value into a valid beat position before zero, which is not
|
||||
we want here.
|
||||
*/
|
||||
Beats b (_beats, _ticks);
|
||||
b._beats = -b._beats;
|
||||
b._ticks = -b._ticks;
|
||||
return b;
|
||||
}
|
||||
|
||||
template<typename Number>
|
||||
|
|
Loading…
Reference in New Issue
Block a user