diff --git a/content/smil/nsSMILKeySpline.cpp b/content/smil/nsSMILKeySpline.cpp index 2579a8a953e..0cee12bc7e6 100644 --- a/content/smil/nsSMILKeySpline.cpp +++ b/content/smil/nsSMILKeySpline.cpp @@ -78,7 +78,8 @@ nsSMILKeySpline::CalcBezier(double aT, double aA1, double aA2) { - return A(aA1, aA2) * pow(aT,3) + B(aA1, aA2)*aT*aT + C(aA1) * aT; + // use Horner's scheme to evaluate the Bezier polynomial + return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT; } /*static*/ double