diff options
Diffstat (limited to 'core/math/triangulate.cpp')
-rw-r--r-- | core/math/triangulate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp index f3e3de5fc2..0a9872ae08 100644 --- a/core/math/triangulate.cpp +++ b/core/math/triangulate.cpp @@ -39,7 +39,7 @@ real_t Triangulate::get_area(const Vector<Vector2> &contour) { for (int p = n - 1, q = 0; q < n; p = q++) { A += c[p].cross(c[q]); } - return A * 0.5; + return A * 0.5f; } /* `is_inside_triangle` decides if a point P is inside the triangle @@ -70,9 +70,9 @@ bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay, bCROSScp = bx * cpy - by * cpx; if (include_edges) { - return ((aCROSSbp > 0.0) && (bCROSScp > 0.0) && (cCROSSap > 0.0)); + return ((aCROSSbp > 0.0f) && (bCROSScp > 0.0f) && (cCROSSap > 0.0f)); } else { - return ((aCROSSbp >= 0.0) && (bCROSScp >= 0.0) && (cCROSSap >= 0.0)); + return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f)); } } @@ -128,7 +128,7 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul /* we want a counter-clockwise polygon in V */ - if (0.0 < get_area(contour)) { + if (0.0f < get_area(contour)) { for (int v = 0; v < n; v++) { V.write[v] = v; } |