]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bezier.cc
* The grand 2005-2006 replace.
[lilypond.git] / lily / bezier.cc
index d6ecd0b3135ba1fce8766b3d473cb6c16c415ef6..4752bc67f91d5850fbbe45d04e055513853d275f 100644 (file)
@@ -3,11 +3,9 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include <math.h>
-
 #include "bezier.hh"
 #include "warn.hh"
 #include "libc-extension.hh"
@@ -68,7 +66,7 @@ translate (Array<Offset> *array, Offset o)
 Real
 Bezier::get_other_coordinate (Axis a, Real x) const
 {
-  Axis other = Axis ((a +1)%NO_AXES);
+  Axis other = Axis ((a +1) % NO_AXES);
   Array<Real> ts = solve_point (a, x);
 
   if (ts.size () == 0)
@@ -230,6 +228,17 @@ Bezier::extent (Axis a) const
   return iv;
 }
 
+Interval
+Bezier::control_point_extent (Axis a) const
+{
+  Interval ext;
+  for (int i = CONTROL_COUNT; i--;)
+    ext.add_point (control_[i][a]);
+
+  return ext;      
+}
+
+
 /**
    Flip around axis A
 */