projects
/
synfig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea30761
)
Avoid some warning asking for explicit brackets.
author
Carlos Lopez
<genetita@gmail.com>
Fri, 2 Oct 2009 16:36:11 +0000
(18:36 +0200)
committer
Carlos Lopez
<genetita@gmail.com>
Fri, 2 Oct 2009 16:36:11 +0000
(18:36 +0200)
synfig-core/src/synfig/valuenode_pow.cpp
patch
|
blob
|
history
diff --git
a/synfig-core/src/synfig/valuenode_pow.cpp
b/synfig-core/src/synfig/valuenode_pow.cpp
index
fa00618
..
20daaeb
100644
(file)
--- a/
synfig-core/src/synfig/valuenode_pow.cpp
+++ b/
synfig-core/src/synfig/valuenode_pow.cpp
@@
-170,14
+170,17
@@
ValueNode_Pow::operator()(Time t)const
if (abs(power) < epsilon) //x^0 = 1
return 1;
if (abs(base) < epsilon)
+ {
if (power > 0) //0^x=0
return Real(0);
else
+ {
if ( ( ((int) power) % 2 != 0) && (base < 0) ) //(-0)^(-odd)=-inf
return -infinite;
else
return infinite;
-
+ }
+ }
if (base <= epsilon && ((int) power) != power) //negative number to fractional power -> undefined
power = ((int) power); //so round off power to nearest integer