projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The mpg target from mod_ppm isn't built by default, but prevent it from being compile...
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
valuenode_scale.cpp
diff --git
a/synfig-core/trunk/src/synfig/valuenode_scale.cpp
b/synfig-core/trunk/src/synfig/valuenode_scale.cpp
index
d6fe03a
..
0ab0735
100644
(file)
--- a/
synfig-core/trunk/src/synfig/valuenode_scale.cpp
+++ b/
synfig-core/trunk/src/synfig/valuenode_scale.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-38,6
+39,7
@@
#include "vector.h"
#include "time.h"
#include "angle.h"
#include "vector.h"
#include "time.h"
#include "angle.h"
+#include <ETL/misc>
#endif
#endif
@@
-175,11
+177,7
@@
synfig::ValueNode_Scale::operator()(Time t)const
return ret;
}
else if(get_type()==ValueBase::TYPE_INTEGER)
return ret;
}
else if(get_type()==ValueBase::TYPE_INTEGER)
- {
- Real ret = (*value_node)(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((*value_node)(t).get(int())*(*scalar)(t).get(Real()));
else if(get_type()==ValueBase::TYPE_REAL)
return (*value_node)(t).get(Real())*(*scalar)(t).get(Real());
else if(get_type()==ValueBase::TYPE_TIME)
else if(get_type()==ValueBase::TYPE_REAL)
return (*value_node)(t).get(Real())*(*scalar)(t).get(Real());
else if(get_type()==ValueBase::TYPE_TIME)