On 2015/11/13 23:15:22, thomasmorley651 wrote:
On 2015/11/13 23:01:39, dak wrote: > Aaand another one. > > https://codereview.appspot.com/270640043/diff/60001/scm/stencil.scm > File scm/stencil.scm (right): > >
https://codereview.appspot.com/270640043/diff/60001/scm/stencil.scm#newcode66
> scm/stencil.scm:66: (if (equal? start stop) > I think that's too optimistic. If you have > start = (0 . 0) > and > stop = (1e-200 . 1e-200) > then your length calculation will still throw out 0.
Good catch, again
> I'd recommend doing this > "foolproof" by starting with the length calculation and going for
the empty
> stencil exactly when the length is zero (since exactly then dividing
by it is
a > bad idea). > > That would make this foolproof. Yes, the additional indentation
level is a
> nuisance. > > One can additionally increase precision by letting > (length-to-print (magnitude (make-rectangular dx dy))) > which turns out to still work when dx and dy are 1e-200 and similar
(meaning
> that their square would underflow precision at least on my
computer).
Will do.
Done. https://codereview.appspot.com/270640043/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel