diff options
-rw-r--r-- | src/value.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/value.h b/src/value.h index f9bd99b..4d8346f 100644 --- a/src/value.h +++ b/src/value.h @@ -3,6 +3,7 @@ #include <vector> #include <string> +#include <algorithm> // Workaround for https://bugreports.qt-project.org/browse/QTBUG-22829 #ifndef Q_MOC_RUN @@ -39,6 +40,13 @@ public: this->end == other.end; } + /// inverse begin/end if begin is upper than end + void normalize() { + if (end < begin) { + std::swap(begin,end); + } + } + double begin; double step; double end; |