]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.20
authorfred <fred>
Sun, 22 Dec 1996 15:59:54 +0000 (15:59 +0000)
committerfred <fred>
Sun, 22 Dec 1996 15:59:54 +0000 (15:59 +0000)
src/calcideal.cc
src/linespace.cc
src/qlpsolve.cc
src/stem.cc
src/texbeam.cc

index 9db9472113b986bdcfd5eea28135ff45eb381734..faf88d6ead48fdde8b0929668011a566d28dbe52 100644 (file)
@@ -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
            
index e403c2dcc034e96764eadfa85b93724d88d359c0..784c1f30ad5125f724cc409045db61de49f9068b 100644 (file)
@@ -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) 
index 21af7cdcb0b5be79ae0756777fd03f35b41171c0..88b703bbbbad7965b56c9dfb6d7eee5e90d703f7 100644 (file)
@@ -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;            
index 03b91b93165e25d31578f40220f507f0cbb39ac8..496425e10fb5feb97eed27b5092cf0cab58f26aa 100644 (file)
@@ -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){         
index 5c082be66992d5eea6fe644ee8f4f19edbd95850..713bc1f4737ef6b2089ad305f3f4f7c776d077d6 100644 (file)
@@ -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));