[buffer] Fix calculation of the number of points. For an angle of 125 or more,

no points in between were generated, which was erroneous.
Thanks to Menelaos for spotting and Adam for the calculation

This changes some of the unit test results, because in some cases a point in between
is generated now, creating a larger polygon
This commit is contained in:
Barend Gehrels
2015-03-08 18:08:43 +01:00
parent a3db6b2ad1
commit 64ee58ed46
6 changed files with 89 additions and 57 deletions

View File

@@ -438,7 +438,7 @@ void test_all()
// (the change was irrelevant to this, so they succeeded earlier by luck).
// TODO: get_occupation/left_turns in combination with a u/u turn
test_one<multi_polygon_type, polygon_type>("rt_u7", rt_u7, join_round, end_flat, 35.6233, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u7_rough", rt_u7, join_round_rough, end_flat, 35.0483, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u7_rough", rt_u7, join_round_rough, end_flat, 35.1675, 1.0);
}
test_one<multi_polygon_type, polygon_type>("rt_u8", rt_u8, join_miter, end_flat, 70.9142, 1.0);