]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bezier.cc
release: 1.5.29
[lilypond.git] / lily / bezier.cc
index 945a1ccda317145d1f11996d378f43b3311534be..6d22b1d6b68a441ba5e4356f9ade405209621bdf 100644 (file)
@@ -3,13 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2001 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1998--2002 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include <math.h>
+
 #include "config.h"
 #include "warn.hh"
-
 #include "libc-extension.hh"
 #include "bezier.hh"
 #include "polynomial.hh"
@@ -58,7 +58,7 @@ translate (Array<Offset>* arr_p, Offset o)
 
   Formula of the bezier 3-spline
 
-  sum_{j=0}^3  (3 over j) z_j (1-t)^(3-j)  t^j
+  sum_{j=0}^3 (3 over j) z_j (1-t)^ (3-j)  t^j
  */
 
 Real
@@ -84,7 +84,7 @@ Offset
 Bezier::curve_point (Real t)const
 {
   Real tj = 1;
-  Real one_min_tj =  (1-t)*(1-t)*(1-t);
+  Real one_min_tj = (1-t)* (1-t)* (1-t);
 
   Offset o;
   for (int j=0 ; j < 4; j++)
@@ -115,7 +115,7 @@ Bezier::polynomial (Axis a)const
       p += control_[j][a]
        * Polynomial::power (j , Polynomial (0,1))*
        Polynomial::power (3 - j, Polynomial (1,-1))*
-       binomial_coefficient(3, j);
+       binomial_coefficient (3, j);
     }
 
   return p;
@@ -156,7 +156,7 @@ Bezier::solve_derivative (Offset deriv)const
 Array<Real> 
 Bezier::solve_point (Axis ax, Real coordinate) const
 {
-  Polynomial p(polynomial (ax));
+  Polynomial p (polynomial (ax));
   p.coefs_[0] -= coordinate;
   
   Array<Real> sol (p.solve ());