From 6ccd634ebb7827701066ed2cc08a322b232814af Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 22 Dec 1996 15:59:54 +0000 Subject: [PATCH] lilypond-0.0.20 --- src/calcideal.cc | 6 +++--- src/linespace.cc | 2 +- src/qlpsolve.cc | 4 ++-- src/stem.cc | 10 +++++----- src/texbeam.cc | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/calcideal.cc b/src/calcideal.cc index 9db9472113..faf88d6ead 100644 --- a/src/calcideal.cc +++ b/src/calcideal.cc @@ -45,12 +45,12 @@ Score::calc_idealspacing() if (i->musical) { assert(j.ok()); for (int n=0; n < i->durations.sz(); n++) { - Real d = i->durations[n]; + Moment d = i->durations[n]; Real dist = paper_->duration_to_dist(d); while (j->when < d + i->when) j++; - assert( distance(j->when, d+i->when) < 1e-8); + assert( j->when== d+i->when); connect(i->pcol_, j->pcol_, dist); if (!j->musical && (j+1).ok() @@ -65,7 +65,7 @@ Score::calc_idealspacing() the last col is breakable, and therefore in use */ - Real d = j->when - i->when; + Moment d = j->when - i->when; Real dist = (d) ? paper_->duration_to_dist(d) : convert_dimen(2,"pt"); // todo diff --git a/src/linespace.cc b/src/linespace.cc index e403c2dcc0..784c1f30ad 100644 --- a/src/linespace.cc +++ b/src/linespace.cc @@ -56,7 +56,7 @@ Spacing_problem::check_constraints(Vector v) const // mtor << "checking solution " << v << '\n'; for (int i=0; i < dim; i++) { - if (cols[i].fixed&& ABS(cols[i].fixpos - v(i)) > COLFUDGE) { + if (cols[i].fixed&& abs(cols[i].fixpos - v(i)) > COLFUDGE) { return false; } if (!i) diff --git a/src/qlpsolve.cc b/src/qlpsolve.cc index 21af7cdcb0..88b703bbbb 100644 --- a/src/qlpsolve.cc +++ b/src/qlpsolve.cc @@ -68,7 +68,7 @@ Active_constraints::add(int k) Vector Ha = H*a; Real aHa = a*Ha; Vector addrow(Ha.dim()); - if (ABS(aHa) > EPS) { + if (abs(aHa) > EPS) { /* a != 0, so if Ha = O(EPS), then Ha * aH / aHa = O(EPS^2/EPS) @@ -203,7 +203,7 @@ Ineq_constrained_qp::solve(Vector start) const } } Real unbounded_alfa = 1.0; - Real optimal_step = MIN(minalf, unbounded_alfa); + Real optimal_step = min(minalf, unbounded_alfa); Vector deltax=direction * optimal_step; x += deltax; diff --git a/src/stem.cc b/src/stem.cc index 03b91b9316..496425e10f 100644 --- a/src/stem.cc +++ b/src/stem.cc @@ -10,7 +10,7 @@ const int STEMLEN=7; -Stem::Stem(int c, Real len) +Stem::Stem(int c, Moment len) { note_length = len; beams_left = 0; @@ -48,7 +48,7 @@ Stem::set_stemend(Real se) top = (dir < 0) ? maxnote : se; bot = (dir < 0) ? se : minnote; - flag = dir*ABS(flag); + flag = dir*abs(flag); } void @@ -116,7 +116,7 @@ Stem::set_noteheads() int parity=0; int lastpos = heads[0]->position; for (int i=1; i < heads.sz(); i ++) { - if (ABS(lastpos- heads[i]->position) == 1) { + if (abs(lastpos- heads[i]->position) == 1) { if (parity) heads[i]->x_dir = (stem_xoffset>0) ? 1:-1; parity = !parity; @@ -138,7 +138,7 @@ Stem::postprocess() Interval Stem::width()const { - if (!print_flag || ABS(flag) <= 4) + if (!print_flag || abs(flag) <= 4) return Interval(0,0); // TODO! Paperdef*p= paper(); Interval r(p->lookup_->flag(flag).dim.x); @@ -161,7 +161,7 @@ Stem::brew_molecole() output = new Molecule(Atom(ss)); - if (print_flag&&ABS(flag) > 4){ + if (print_flag&&abs(flag) > 4){ Symbol fl = p->lookup_->flag(flag); Molecule m(fl); if (flag < -4){ diff --git a/src/texbeam.cc b/src/texbeam.cc index 5c082be669..713bc1f473 100644 --- a/src/texbeam.cc +++ b/src/texbeam.cc @@ -33,9 +33,9 @@ Lookup::beam_element(int sidx, int widx, Real slope) static int slope_index(Real &s) { - if (ABS(s) > 0.5) { + if (abs(s) > 0.5) { WARN << "beam steeper than 0.5"; - s = sgn(s) * 0.5; + s = sign(s) * 0.5; } int i = int(rint(s * 20.0)); -- 2.39.5