#include <math.h>
-#include "config.h"
+#include "config.hh"
#include "warn.hh"
#include "libc-extension.hh"
#include "bezier.hh"
Formula of the bezier 3-spline
sum_{j=0}^3 (3 over j) z_j (1-t)^ (3-j) t^j
+
+
+ A is the axis of X coordinate.
*/
Real
Polynomial p (0.0);
for (int j=0; j <= 3; j++)
{
- p += (control_[j][a] * binomial_coefficient (3, j))
- * Polynomial::power (j , Polynomial (0,1))*
- Polynomial::power (3 - j, Polynomial (1,-1));
+ p +=
+ (control_[j][a] * binomial_coefficient (3, j))
+ * Polynomial::power (j, Polynomial (0, 1))
+ * Polynomial::power (3 - j, Polynomial (1, -1));
}
return p;
/**
Flip around axis A
*/
-
void
Bezier::scale (Real x, Real y)
{