fromPoints

fun fromPoints(positions: ReadonlyArray<Cartesian2>, result: BoundingRectangle? = definedExternally): BoundingRectangle(source)

Computes a bounding rectangle enclosing the list of 2D points. The rectangle is oriented with the corner at the bottom left.

Return

The modified result parameter or a new BoundingRectangle instance if one was not provided.

Parameters

positions

List of points that the bounding rectangle will enclose. Each point must have x and y properties.

result

The object onto which to store the result.

See also