regular
fun regular(sides: Int, radius: Double, center: Vec2 = Vec2.ZERO, startAngle: Double = 0.0, precision: DoubleEquivalence = DEFAULT_DOUBLE_EQUIVALENCE): Polygon2(source)
Creates a regular polygon with the specified number of sides, centered at a given point.
Return
A new regular polygon.
Parameters
sides
The number of sides of the polygon (must be at least 3).
radius
The radius of the circumscribed circle.
center
The center point of the polygon. Defaults to the origin.
startAngle
The starting angle in radians for the first vertex. Defaults to 0.
precision
The precision used for geometric computations.