mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-17 05:40:31 +02:00
Update IntelliHelper.cpp
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user