[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

@@ -224,11 +224,11 @@ bool CalculationController::textFieldDidFinishEditing(TextField * textField, con
return false;
}
if (m_calculation->type() != Calculation::Type::FiniteIntegral && m_highlightedSubviewIndex == 2) {
if (floatBody < 0.0f) {
floatBody = 0.0f;
if (floatBody < 0.0) {
floatBody = 0.0;
}
if (floatBody > 1.0f) {
floatBody = 1.0f;
if (floatBody > 1.0) {
floatBody = 1.0;
}
}
if (!m_law->isContinuous() && (m_highlightedSubviewIndex == 1 || m_calculation->type() == Calculation::Type::FiniteIntegral)) {