diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2017-12-31 18:00:25 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-31 18:00:25 -0200 |
commit | 0c0280cfcf540f943fd2dbfdf7ac0304ea96a465 (patch) | |
tree | 51c89fc8155dcc447743dc89a1ab5ce36acc72cf /Project/Exponential.cpp | |
parent | c8193665975686fb8a344bee3dc94914a3d3558a (diff) | |
parent | dbe0b112622f8e91fa3e44a6b6e1aa7e230d3ded (diff) | |
download | PSP.git-0c0280cfcf540f943fd2dbfdf7ac0304ea96a465.tar.gz PSP.git-0c0280cfcf540f943fd2dbfdf7ac0304ea96a465.tar.xz PSP.git-0c0280cfcf540f943fd2dbfdf7ac0304ea96a465.zip |
Merge pull request #43 from Thales1330/wip/math-expr-control-block
Wip math expr control block
Diffstat (limited to 'Project/Exponential.cpp')
-rw-r--r-- | Project/Exponential.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Project/Exponential.cpp b/Project/Exponential.cpp index 64af421..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) +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; } |