From: Keith OHara Date: Sat, 24 Aug 2013 06:13:40 +0000 (-0700) Subject: Skylines: reject steep-sloped buildings; issue 3383 X-Git-Tag: release/2.17.26-1~18^2~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5844c989bd052a41f833a24802260b830123ab51;p=lilypond.git Skylines: reject steep-sloped buildings; issue 3383 --- diff --git a/lily/skyline.cc b/lily/skyline.cc index 8654f0d973..70bf989861 100644 --- a/lily/skyline.cc +++ b/lily/skyline.cc @@ -125,6 +125,12 @@ Building::precompute (Real start, Real start_height, Real end_height, Real end) assert (start_height == end_height); y_intercept_ = start_height; } + else if (fabs(slope_) > 1e6) + // too steep to be stored in slope-intercept form, given round-off error + { + slope_ = 0.0; + y_intercept_ = max(start_height, end_height); + } else y_intercept_ = start_height - slope_ * start; }