Polygon:getArea

From GiderosMobile
Revision as of 18:10, 14 November 2026 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2015.03.22<br/> '''Class:''' Clipper<br/> === Description === Returns the signed area of the polygon. The sign follows the orient...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2015.03.22
Class: Clipper

Description

Returns the signed area of the polygon. The sign follows the orientation of the vertices (positive for counter clockwise, negative for clockwise).

(number) = Polygon:getArea()

Return values

Returns (number) signed area in square units

Example

local area = poly:getArea()
print("area =", math.abs(area))