Skip to content

Commit

Permalink
Removed external dependency M_PI_4
Browse files Browse the repository at this point in the history
  • Loading branch information
corporateshark committed Mar 13, 2021
1 parent 8147fea commit c5842f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PoissonGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ std::vector<Point> generatePoissonPoints(

// if we want to generate a Poisson square shape, multiply the estimate number of points by PI/4 due to reduced shape area
if (!isCircle)
numPoints = static_cast<int>(M_PI_4 * numPoints);
{
const double Pi_4 = 0.785398163397448309616; // PI/4
numPoints = static_cast<int>(Pi_4 * numPoints);
}

if ( minDist < 0.0f )
{
Expand Down

0 comments on commit c5842f9

Please sign in to comment.