source file of the GNU LilyPond music typesetter
- (c) 1998--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include <math.h>
}
Offset c = curve_point (ts[0]);
- assert (fabs (c[a] - x) < 1e-8);
+
+ if (fabs (c[a] - x) > 1e-8)
+ programming_error ("Bezier intersection not correct?");
return c[other];
}
Polynomial p (0.0);
for (int j=0; j <= 3; j++)
{
- p += control_[j][a]
+ p += (control_[j][a] * binomial_coefficient (3, j))
* Polynomial::power (j , Polynomial (0,1))*
- Polynomial::power (3 - j, Polynomial (1,-1))*
- binomial_coefficient (3, j);
+ Polynomial::power (3 - j, Polynomial (1,-1));
}
return p;