simplified

Tue, 19 Jun 2018 22:00:46 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 19 Jun 2018 22:00:46 +0300
changeset 1410
e76e219c48e9
parent 1409
2d4649fd9a20
child 1411
b48f3fd2664b

simplified

src/linetypes/circularprimitive.cpp file | annotate | diff | comparison | revisions
--- 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