Add love.math.isConvex()

Checks whether a given polygon is convex or not.
This commit is contained in:
vrld
2013-05-12 13:00:08 +02:00
parent c1cbd610e6
commit d454be7025
4 changed files with 75 additions and 0 deletions
+8
View File
@@ -108,6 +108,14 @@ public:
**/
std::vector<Triangle> triangulate(const std::vector<vertex> &polygon);
/**
* Checks whether a polygon is convex.
*
* @param polygon Polygon to test.
* @return True if the polygon is convex, false otherwise.
**/
bool isConvex(const std::vector<vertex> &polygon);
/**
* Calculate Simplex noise for the specified coordinate(s).
*