diff --git a/lily/skyline.cc b/lily/skyline.cc index 5297f63..362fbba 100644 --- a/lily/skyline.cc +++ b/lily/skyline.cc @@ -45,6 +45,7 @@ /* If we start including very thin buildings, numerical accuracy errors can arise. Therefore, we ignore all buildings that are less than epsilon wide. */ #define EPS 1e-5 +#define EPSNULL 1e-12 static void print_buildings (list const &b) @@ -215,6 +216,9 @@ Skyline::internal_merge_skyline (list *s1, list *s2, if (end >= s1->front ().end_) s1->pop_front (); + if (abs (end - x) < EPSNULL) + break; + x = end; } result->reverse ();