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 45ca0a5ab8
commit cfa407616f
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 ) );
}
/**