src/linetypes/circularprimitive.cpp

changeset 1410
e76e219c48e9
parent 1409
2d4649fd9a20
child 1412
f5eb947a2e7f
--- a/src/linetypes/circularprimitive.cpp	Tue Jun 19 21:57:39 2018 +0300
+++ b/src/linetypes/circularprimitive.cpp	Tue Jun 19 22:00:46 2018 +0300
@@ -242,10 +242,7 @@
 		return 0;
 
 	case PrimitiveModel::Chord:
-		if (m_segments >= m_divisions -1)
-			return m_divisions - 2;
-		else
-			return max(0, m_segments - 1);
+		return qBound(0, m_segments - 1, m_divisions - 2);
 	}
 
 	return 0;

mercurial