[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

@@ -6,7 +6,7 @@
#include "../../../poincare/src/layout/horizontal_layout.h"
#include <assert.h>
#include <math.h>
#include <cmath>
#include <stdlib.h>
using namespace Shared;
@@ -64,14 +64,14 @@ bool TermSumController::handleEvent(Ion::Events::Event event) {
if (m_step > 0 && m_startSum >= m_cursor->x()) {
return false;
}
if (moveCursorHorizontallyToPosition(roundf(m_cursor->x()-1.0f))) {
if (moveCursorHorizontallyToPosition(std::round(m_cursor->x()-1.0f))) {
m_graphView->reload();
return true;
}
return false;
}
if (event == Ion::Events::Right) {
if (moveCursorHorizontallyToPosition(roundf(m_cursor->x()+1.0f))) {
if (moveCursorHorizontallyToPosition(std::round(m_cursor->x()+1.0f))) {
m_graphView->reload();
return true;
}