Update IntelliHelper.cpp

This commit is contained in:
Sonaion
2019-12-20 08:56:15 +01:00
parent 6ff32a141a
commit 279b46bc1d

View File

@@ -2,6 +2,7 @@
#include <algorithm> #include <algorithm>
#include <queue> #include <queue>
#include <cmath> #include <cmath>
#define PI_HALF 1.57079632679489661923
std::vector<Triangle> IntelliHelper::calculateTriangles(std::vector<QPoint> polyPoints){ std::vector<Triangle> IntelliHelper::calculateTriangles(std::vector<QPoint> polyPoints){
@@ -46,7 +47,7 @@ std::vector<Triangle> IntelliHelper::calculateTriangles(std::vector<QPoint> poly
// return if the vertex is a tip // return if the vertex is a tip
auto isTip = [](float angle){ auto isTip = [](float angle){
return static_cast<double>(angle)<(M_PI/2.); return static_cast<double>(angle)<(PI_HALF);
}; };
std::vector<TriangleHelper> Vertices; std::vector<TriangleHelper> Vertices;