aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node
diff options
context:
space:
mode:
authorobiwankennedy <renaud@rolisteam.org>2018-05-11 11:50:41 +0200
committerobiwankennedy <renaud@rolisteam.org>2018-05-11 11:50:41 +0200
commita8d1ec21a93d970ce9329cab4899f7df4fb587b3 (patch)
treea753d56e1ea768354fd54060d8e45e78feb1f3e2 /node
parentcfed59df0d283e0f15ada1000baf10ea715c857d (diff)
downloadOneRoll-a8d1ec21a93d970ce9329cab4899f7df4fb587b3.tar.gz
OneRoll-a8d1ec21a93d970ce9329cab4899f7df4fb587b3.zip
scalar node is real compatible now
Diffstat (limited to 'node')
-rw-r--r--node/scalaroperatornode.cpp8
-rw-r--r--node/scalaroperatornode.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/node/scalaroperatornode.cpp b/node/scalaroperatornode.cpp
index 1c8ce4e..46c13c9 100644
--- a/node/scalaroperatornode.cpp
+++ b/node/scalaroperatornode.cpp
@@ -109,15 +109,15 @@ void ScalarOperatorNode::setInternalNode(ExecutionNode* node)
{
m_internalNode = node;
}
-qint64 ScalarOperatorNode::add(qint64 a,qint64 b)
+qint64 ScalarOperatorNode::add(qreal a,qreal b)
{
return a+b;
}
-qint64 ScalarOperatorNode::substract(qint64 a,qint64 b)
+qint64 ScalarOperatorNode::substract(qreal a,qreal b)
{
return a-b;
}
-qreal ScalarOperatorNode::divide(qint64 a,qint64 b)
+qreal ScalarOperatorNode::divide(qreal a,qreal b)
{
if(b==0)
{
@@ -126,7 +126,7 @@ qreal ScalarOperatorNode::divide(qint64 a,qint64 b)
}
return (qreal)a/b;
}
-qint64 ScalarOperatorNode::multiple(qint64 a,qint64 b)
+qint64 ScalarOperatorNode::multiple(qreal a,qreal b)
{
return a*b;
}
diff --git a/node/scalaroperatornode.h b/node/scalaroperatornode.h
index 0855a4c..f17f99f 100644
--- a/node/scalaroperatornode.h
+++ b/node/scalaroperatornode.h
@@ -99,22 +99,22 @@ private:
* @brief add
* @return
*/
- static qint64 add(qint64,qint64);
+ static qint64 add(qreal,qreal);
/**
* @brief substract
* @return
*/
- static qint64 substract(qint64,qint64);
+ static qint64 substract(qreal,qreal);
/**
* @brief divide not static because of error management
* @return
*/
- qreal divide(qint64,qint64);
+ qreal divide(qreal,qreal);
/**
* @brief multiple
* @return
*/
- static qint64 multiple(qint64,qint64);
+ static qint64 multiple(qreal,qreal);
private:
ExecutionNode* m_internalNode;