On 2019-10-30 2:05 am, Rutger Hofman wrote:
Sincere request: can this assert please be removed? Its validity
appears
debatable, and it is a showstopper for me!
If we agree that an empty interval does not have a well-defined center,
then the assertion is quite valid.
But the problematic intervals in question were never intended to ever be
empty, yet their left and right bounds are computed in such a way to
form degenerate, "inside-out" intervals that are treated as empty. The
assertion properly is pointing out this flaw in computation. As such,
we should not be removing the assertion, because rather we should ensure
that computations never invert the bounds of an interval.
That said, I feel the hard-fail approach of an assertion is too strong,
and what we need is to simply emit a warning that the function will be
returning the midpoint of the interval's bounds despite the interval
appearing to be invalid (read: empty).
-- Aaron Hill
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond