clone

fun clone(rectangle: Rectangle, result: Rectangle? = definedExternally): Rectangle(source)

Duplicates a Rectangle.

Return

The modified result parameter or a new Rectangle instance if none was provided. (Returns undefined if rectangle is undefined)

Parameters

rectangle

The rectangle to clone.

result

The object onto which to store the result, or undefined if a new instance should be created.

See also