translate

open override fun translate(offset: Vec2): Polygon2(source)

Translates the polygon by a given offset vector.

Return

A new polygon with all vertices translated by the offset.

Parameters

offset

The vector by which to translate the polygon.