projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo: 'suposidly' -> 'supposedly'.
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
valuenode_subtract.cpp
diff --git
a/synfig-core/trunk/src/synfig/valuenode_subtract.cpp
b/synfig-core/trunk/src/synfig/valuenode_subtract.cpp
index
81fca92
..
27df6a0
100644
(file)
--- a/
synfig-core/trunk/src/synfig/valuenode_subtract.cpp
+++ b/
synfig-core/trunk/src/synfig/valuenode_subtract.cpp
@@
-38,6
+38,7
@@
#include "vector.h"
#include "angle.h"
#include "real.h"
#include "vector.h"
#include "angle.h"
#include "real.h"
+#include <ETL/misc>
#endif
#endif
@@
-173,11
+174,7
@@
synfig::ValueNode_Subtract::operator()(Time t)const
case ValueBase::TYPE_COLOR:
return ((*ref_a)(t).get(Color())-(*ref_b)(t).get(Color()))*(*scalar)(t).get(Real());
case ValueBase::TYPE_INTEGER:
case ValueBase::TYPE_COLOR:
return ((*ref_a)(t).get(Color())-(*ref_b)(t).get(Color()))*(*scalar)(t).get(Real());
case ValueBase::TYPE_INTEGER:
- {
- Real ret = ((*ref_a)(t).get(int())-(*ref_b)(t).get(int()))*(*scalar)(t).get(Real()) + 0.5f;
- if (ret < 0) return static_cast<int>(ret-1);
- return static_cast<int>(ret);
- }
+ return round_to_int(((*ref_a)(t).get(int())-(*ref_b)(t).get(int()))*(*scalar)(t).get(Real()));
case ValueBase::TYPE_REAL:
return ((*ref_a)(t).get(Vector::value_type())-(*ref_b)(t).get(Vector::value_type()))*(*scalar)(t).get(Real());
case ValueBase::TYPE_TIME:
case ValueBase::TYPE_REAL:
return ((*ref_a)(t).get(Vector::value_type())-(*ref_b)(t).get(Vector::value_type()))*(*scalar)(t).get(Real());
case ValueBase::TYPE_TIME: