Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Point

<static> GetRectangleFromPoints(points, [out])

Description:

Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.

Parameters:

name type arguments description
points Array.<Phaser.Types.Math.Vector2Like>

An array of Vector2Like objects to get the AABB from.

out Phaser.Geom.Rectangle <optional>

A Rectangle object to store the results in. If not given, a new Rectangle instance is created.

Returns:
Description:

A Rectangle object holding the AABB values for the given points.

Since: 3.0.0