mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-02 21:02:13 +00:00
[strategies][cartesian][buffer][join_round] optimize expression
calculating number of interior points
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user