source file of the GNU LilyPond music typesetter
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <math.h>
+#ifndef STANDALONE
#include "string.hh"
+#endif
#include "offset.hh"
+#ifndef STANDALONE
String
Offset::str () const
{
String s;
- s = String("(") + coordinate_a_[X_AXIS] + ", " + coordinate_a_[Y_AXIS] + ")";
+ s = String("(") + to_str (coordinate_a_[X_AXIS]) + ", "
+ + to_str (coordinate_a_[Y_AXIS]) + ")";
return s;
}
-
+#endif
Offset
complex_multiply (Offset z1, Offset z2)
{
Offset z;
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];
+ z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS];
return z;
}