Don't allow degenerate arcs & circles. Trouble will follow.

This commit is contained in:
Jeff Young 2020-01-15 18:45:06 +00:00
parent e5d68e4822
commit c98621691a
1 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,9 @@ public:
int GetRadius() const
{
double radius = GetLineLength( m_Start, m_End );
return KiROUND( radius );
// don't allow degenerate arcs
return std::max( 1, KiROUND( radius ) );
}
/**