[strategies][cartesian][buffer][join_round] optimize expression

calculating number of interior points
This commit is contained in:
Menelaos Karavelas
2015-03-08 20:10:50 +02:00
parent efe9a9b7b8
commit ca45ee76ac

View File

@@ -96,8 +96,8 @@ private :
// - generates 1 point in between for an angle of 125 based on 3 points
// - generates 0 points in between for an angle of 90 based on 4 points
int const n = 1 + std::max(static_cast<int>(
ceil(-1.0 + m_points_per_circle * angle_diff / two_pi)), 0);
int const n = std::max(static_cast<int>(
ceil(m_points_per_circle * angle_diff / two_pi)), 1);
PromotedType const diff = angle_diff / static_cast<PromotedType>(n);
PromotedType a = angle1 - diff;