diff options
-rw-r--r-- | libs/temporal/temporal/beats.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/temporal/temporal/beats.h b/libs/temporal/temporal/beats.h index 5c8538641a..a7c8696db3 100644 --- a/libs/temporal/temporal/beats.h +++ b/libs/temporal/temporal/beats.h @@ -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> |