union

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

Computes a rectangle that is the union of two rectangles.

Return

The modified result parameter or a new Rectangle instance if none was provided.

Parameters

rectangle

A rectangle to enclose in rectangle.

otherRectangle

A rectangle to enclose in a rectangle.

result

The object onto which to store the result.

See also