From: fred Date: Sun, 22 Dec 1996 20:13:24 +0000 (+0000) Subject: lilypond-0.0.20 X-Git-Tag: release/1.5.59~6501 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=14c4e8aba7a6252b96034b69bc4387295eed4496;p=lilypond.git lilypond-0.0.20 --- diff --git a/hdr/boxes.hh b/hdr/boxes.hh index 5bc2cb2e73..d817dc42e8 100644 --- a/hdr/boxes.hh +++ b/hdr/boxes.hh @@ -8,35 +8,8 @@ #include "fproto.hh" #include "real.hh" #include "interval.hh" - - -/// 2d vector -struct Offset { - Real x,y; - - Offset operator+(Offset o)const { - Offset r(*this); - r+=o; - return r; - } - - Offset operator+=(Offset o) { - x+=o.x; - y+=o.y; - return *this; - } - Offset(Real ix , Real iy) { - x=ix; - y=iy; - } - Offset() { - x=0.0; - y=0.0; - } -}; - - -/// a 4-tuple of #Real#s +#include "offset.hh" +/// a square subset of Real^2 struct Box { Interval x, y; @@ -48,7 +21,6 @@ struct Box { x.unite(b.x); y.unite(b.y); } - Box(svec &); Box(); Box(Interval ix, Interval iy); }; diff --git a/hdr/leastsquares.hh b/hdr/leastsquares.hh index 71586d8d5c..105efd0aa7 100644 --- a/hdr/leastsquares.hh +++ b/hdr/leastsquares.hh @@ -7,7 +7,7 @@ #ifndef LEASTSQUARE_HH #define LEASTSQUARE_HH #include "vray.hh" -#include "boxes.hh" +#include "offset.hh" struct Least_squares { svec input; diff --git a/hdr/offset.hh b/hdr/offset.hh new file mode 100644 index 0000000000..b1867007fa --- /dev/null +++ b/hdr/offset.hh @@ -0,0 +1,38 @@ +/* + offset.hh -- part of LilyPond + + (c) 1996 Han-Wen Nienhuys +*/ + +#ifndef OFFSET_HH +#define OFFSET_HH +#include "real.hh" + +/// 2d vector +struct Offset { + Real x,y; + + Offset operator+(Offset o)const { + Offset r(*this); + r+=o; + return r; + } + + Offset operator+=(Offset o) { + x+=o.x; + y+=o.y; + return *this; + } + Offset(Real ix , Real iy) { + x=ix; + y=iy; + } + Offset() { + x=0.0; + y=0.0; + } +}; + +#endif // OFFSET_HH + +