From dbe0b112622f8e91fa3e44a6b6e1aa7e230d3ded Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sun, 31 Dec 2017 17:59:10 -0200 Subject: Math Expression implemented --- Project/Exponential.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Project/Exponential.cpp') diff --git a/Project/Exponential.cpp b/Project/Exponential.cpp index e07525b..a021854 100644 --- a/Project/Exponential.cpp +++ b/Project/Exponential.cpp @@ -129,9 +129,13 @@ void Exponential::SetValues(double aValue, double bValue) m_bValue = bValue; } -bool Exponential::Solve(double input, double timeStep, double currentTime) +bool Exponential::Solve(double* input, double timeStep) { - m_output = m_aValue * std::exp(m_bValue * input); + if(!input){ + m_output = 0.0; + return true; + } + m_output = m_aValue * std::exp(m_bValue * input[0]); return true; } -- cgit