{{newin|[[0.9.0]]|090|type=function}}
Checks whether a polygon is convex.

[[PolygonShape]]s in [[love.physics]], some forms of [[Mesh]]es, and polygons drawn with [[love.graphics.polygon]] must be simple convex polygons.
== Function ==
=== Synopsis ===
<source lang="lua">
convex = love.math.isConvex( vertices )
</source>
=== Arguments ===
{{param|table|vertices|The vertices of the polygon as a table in the form of <code><nowiki>{x1, y1, x2, y2, x3, y3, ...}</nowiki></code>.}}

=== Returns ===
{{param|boolean|convex|Whether the given polygon is convex.}}
== Function ==
=== Synopsis ===
<source lang="lua">
convex = love.math.isConvex( x1, y1, x2, y2, x3, y3, ... )
</source>
=== Arguments ===
{{param|number|x1|The position of the first vertex of the polygon on the x-axis.}}
{{param|number|y1|The position of the first vertex of the polygon on the y-axis.}}
{{param|number|x2|The position of the second vertex of the polygon on the x-axis.}}
{{param|number|y2|The position of the second vertex of the polygon on the y-axis.}}
{{param|number|x3|The position of the third vertex of the polygon on the x-axis.}}
{{param|number|y3|The position of the third vertex of the polygon on the y-axis.}}
=== Returns ===
{{param|boolean|convex|Whether the given polygon is convex.}}
== See Also ==
* [[love.math.triangulate]]
* [[parent::love.math]]
[[Category:Functions]]
{{#set:Description=Checks whether a polygon is convex.}}
== Other Languages ==
{{i18n|love.math.isConvex}}