[libaxx] add cmath and use cmath instead of math.h when required

Change-Id: Id839b17d33c69e2e002f370e553ff35246a1bc90
This commit is contained in:
Émilie Feral
2017-08-07 11:47:47 +02:00
parent 9f0bbe0e75
commit 1964d61fdc
111 changed files with 377 additions and 303 deletions

View File

@@ -1,6 +1,7 @@
#include "function_go_to_parameter_controller.h"
#include "text_field_delegate_app.h"
#include <assert.h>
#include <cmath>
namespace Shared {
@@ -23,7 +24,7 @@ bool FunctionGoToParameterController::setParameterAtIndex(int parameterIndex, fl
assert(parameterIndex == 0);
TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)app();
float y = m_function->evaluateAtAbscissa(f, myApp->localContext());
if (fabsf(f) > k_maxDisplayableFloat || fabsf(y) > k_maxDisplayableFloat) {
if (std::fabs(f) > k_maxDisplayableFloat || std::fabs(y) > k_maxDisplayableFloat) {
app()->displayWarning(I18n::Message::ForbiddenValue);
return false;
}