fix invalid circle centers

This commit is contained in:
Moritz Kobitzsch
2016-06-24 12:29:53 +02:00
committed by Patrick Niklaus
parent 61ba985bc9
commit e03d132823
2 changed files with 11 additions and 1 deletions
@@ -302,6 +302,13 @@ BOOST_AUTO_TEST_CASE(circleCenter)
c = Coordinate(FloatLongitude(-112.096419), FloatLatitude(41.147259));
result = coordinate_calculation::circleCenter(a, b, c);
BOOST_CHECK(!result);
// Out of bounds
a = Coordinate(FloatLongitude(-112.096234), FloatLatitude(41.147258));
b = Coordinate(FloatLongitude(-112.106606), FloatLatitude(41.147259));
c = Coordinate(FloatLongitude(-113.096419), FloatLatitude(41.147258));
result = coordinate_calculation::circleCenter(a, b, c);
BOOST_CHECK(!result);
}
BOOST_AUTO_TEST_SUITE_END()