src/geometry.cpp

changeset 250
2837b549e616
parent 223
ce81db996275
child 264
76a025db4948
--- a/src/geometry.cpp	Wed Jun 22 16:13:15 2022 +0300
+++ b/src/geometry.cpp	Wed Jun 22 16:53:35 2022 +0300
@@ -217,11 +217,11 @@
 
 bool isConvex(const std::vector<glm::vec3>& polygon)
 {
-	const int n = polygon.size();
+	const std::size_t n = polygon.size();
 	auto polygonRing = iter::ring(polygon, n);
 	std::vector<glm::vec3> crosses;
 	crosses.resize(n);
-	for (int i = 0; i < n; i += 1)
+	for (std::size_t i = 0; i < n; i += 1)
 	{
 		crosses[i] = glm::cross(polygonRing[i - 1] - polygonRing[i], polygonRing[i + 1] - polygonRing[i]);
 	}

mercurial