[apps] Operations in double when precision required

Change-Id: I7168a861a76178f0bf81841e9378f7399f67914a
This commit is contained in:
Émilie Feral
2017-08-04 18:24:09 +02:00
parent 82e212e771
commit f0a776a670
82 changed files with 494 additions and 463 deletions

View File

@@ -20,12 +20,12 @@ void IntervalParameterController::willDisplayCellForIndex(HighlightCell * cell,
FloatParameterController::willDisplayCellForIndex(cell, index);
}
bool IntervalParameterController::setParameterAtIndex(int parameterIndex, float f) {
bool IntervalParameterController::setParameterAtIndex(int parameterIndex, double f) {
if (f < 0) {
app()->displayWarning(I18n::Message::ForbiddenValue);
return false;
}
float parameter = std::round(f);
double parameter = std::round(f);
if (parameterIndex == 2 && parameter == 0.0f) {
parameter = 1.0f;
}