]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/offset.cc
*** empty log message ***
[lilypond.git] / flower / offset.cc
index ed2598da61d8043c13917baaea47a3c428166883..9af1f0d90713bae1a8641365c5e3177e5a2f9b97 100644 (file)
@@ -3,23 +3,20 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
-#include <math.h>
 
-#ifndef STANDALONE
-#include "string.hh"
-#endif
 #include "offset.hh"
 
+#include <cmath>
 
 #ifndef STANDALONE
 String
-Offset::str () const
+Offset::to_string () const
 {
   String s;
-  s = String("(") + to_str (coordinate_a_[X_AXIS]) + ", " 
-    + to_str (coordinate_a_[Y_AXIS]) + ")";
+  s = String (" (") + ::to_string (coordinate_a_[X_AXIS]) + ", " 
+    + ::to_string (coordinate_a_[Y_AXIS]) + ")";
   return s;
 }
 #endif
@@ -39,7 +36,7 @@ Offset
 complex_multiply (Offset z1, Offset z2)
 {
   Offset z;
-  if(!isinf_b(z2[Y_AXIS]))
+  if (!isinf_b (z2[Y_AXIS]))
   {
       z[X_AXIS] = z1[X_AXIS] * z2[X_AXIS] - z1[Y_AXIS]*z2[Y_AXIS];
       z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS];
@@ -74,7 +71,7 @@ complex_exp (Offset o)
   
   Real r = exp (o[X_AXIS]);
 
-  return Offset(r*c, r*s);
+  return Offset (r*c, r*s);
 }
 
 Real
@@ -91,8 +88,3 @@ Offset::length () const
 {
   return sqrt (sqr (coordinate_a_[X_AXIS]) + sqr (coordinate_a_[Y_AXIS]));
 }
-void
-Offset::mirror (Axis a)
-{
-  coordinate_a_[a] = - coordinate_a_[a];
-}