|
From: | dak |
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:01:39 +0000 |
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. 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). https://codereview.appspot.com/270640043/
[Prev in Thread] | Current Thread | [Next in Thread] |