Browse Source

Don't randomize ParamQuantity if unbounded.

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
4e766a7eca
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/engine/ParamQuantity.cpp

+ 3
- 0
src/engine/ParamQuantity.cpp View File

@@ -128,6 +128,9 @@ void ParamQuantity::reset() {
}

void ParamQuantity::randomize() {
if (!isBounded())
return;

if (snapEnabled) {
// Randomize inclusive of the maximum value
float value = math::rescale(random::uniform(), 0.f, 1.f, getMinValue(), getMaxValue() + 1.f);


Loading…
Cancel
Save