Skip to content

1681-engine / index / regularPolygon

Function: regularPolygon() ​

ts
function regularPolygon(sides, radius): PolygonShape;

Defined in: src/physics/polygon.ts:48

A regular polygon of sides corners on a circle of radius, its first corner straight up.

Parameters ​

ParameterType
sidesnumber
radiusnumber

Returns ​

PolygonShape

Released under the MIT License.