summaryrefslogtreecommitdiff
path: root/src/utils/minmax.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/minmax.h')
-rw-r--r--src/utils/minmax.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/utils/minmax.h b/src/utils/minmax.h
index 427c5da7..353c60e7 100644
--- a/src/utils/minmax.h
+++ b/src/utils/minmax.h
@@ -40,6 +40,27 @@ template <typename T> struct MinMax
set(val, val);
}
+ bool operator+= (T arg)
+ {
+ minVal += arg;
+ maxVal += arg;
+ return true;
+ }
+
+ bool operator-= (T arg)
+ {
+ minVal -= arg;
+ maxVal -= arg;
+ return true;
+ }
+
+ bool operator*= (T arg)
+ {
+ minVal *= arg;
+ maxVal *= arg;
+ return true;
+ }
+
T value()
{
return (T)(minVal + (maxVal - minVal) * (rand() / ((double) RAND_MAX + 1)));