mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Operations in double when precision required
Change-Id: I7168a861a76178f0bf81841e9378f7399f67914a
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user