[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix representation switching from line-position to staff-space (issu
From: |
k-ohara5a5a |
Subject: |
Re: fix representation switching from line-position to staff-space (issue 6778050) |
Date: |
Sun, 28 Oct 2012 17:56:57 +0000 |
http://codereview.appspot.com/6778050/diff/1001/lily/breathing-sign.cc
File lily/breathing-sign.cc (left):
http://codereview.appspot.com/6778050/diff/1001/lily/breathing-sign.cc#oldcode85
lily/breathing-sign.cc:85: ydim.widen (-0.25 * ydim.delta ());
Use ydim.length() so the reader does not wonder if ydim is allowed to
have reversed order.
http://codereview.appspot.com/6778050/diff/1001/lily/breathing-sign.cc#oldcode88
lily/breathing-sign.cc:88: int const int_dim = (int) ydim[i];
On 2012/10/27 20:34:35, benko.pal wrote:
On 2012/10/27 19:36:21, Keith wrote:
> If you want to avoid ending the divisi at a fractional position,
maybe just
> ydim[i] = int_dim;
this juggling was done only because Symbol_referencer::on_staff_line
takes an
int, whereas the staff positions are Reals.
I suppose that by 'juggling' you mean creating an int version while
continuing to use fractional positions. It seems that we always want to
end of the divisi at a whole-number position, and then more specifically
we want it on a staff position that is a space, not a line :
ydim[i] = rint(ydim[i]);
if (Staff_symbol_referencer::on_staff_line(me, (int) ydim[i])))
ydim[i] += 1.0 * i;
http://codereview.appspot.com/6778050/