lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implement make-bow-stencil, make-tie-stencil for use in markup-comma


From: thomasmorley65
Subject: Re: Implement make-bow-stencil, make-tie-stencil for use in markup-commands undertie and overtie (issue 270640043 by address@hidden)
Date: Fri, 13 Nov 2015 23:15:22 +0000

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.



https://codereview.appspot.com/270640043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]