Fix bug in testcase.

This commit is contained in:
Jeff Young 2020-04-29 12:36:11 +01:00
parent bba2fa3028
commit d17664c519
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ BOOST_AUTO_TEST_CASE( SegDistance )
{ {
SHAPE_POLY_SET polyset = c.m_polyset; SHAPE_POLY_SET polyset = c.m_polyset;
int dist = sqrt( polyset.SquaredDistance( c.m_seg ) ) - c.m_seg_width; int dist = sqrt( polyset.SquaredDistance( c.m_seg ) ) - ( c.m_seg_width / 2 );
// right answer? // right answer?
BOOST_CHECK_PREDICATE( KI_TEST::IsWithin<int>, ( dist )( c.m_exp_dist )( 1 ) ); BOOST_CHECK_PREDICATE( KI_TEST::IsWithin<int>, ( dist )( c.m_exp_dist )( 1 ) );