Avoid some warning asking for explicit brackets.
authorCarlos Lopez <genetita@gmail.com>
Fri, 2 Oct 2009 16:36:11 +0000 (18:36 +0200)
committerCarlos Lopez <genetita@gmail.com>
Fri, 2 Oct 2009 16:36:11 +0000 (18:36 +0200)
synfig-core/src/synfig/valuenode_pow.cpp

index fa00618..20daaeb 100644 (file)
@@ -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