Phaser API Documentation

  Version: 
<static> Random(rect, out)

Description:

Returns a random point within a Rectangle.

Parameters:

name type description
rect Phaser.Geom.Rectangle

The Rectangle to return a point from.

out Phaser.Geom.Point

The object to update with the point's coordinates.

Returns:
Description:

The modified out object, or a new Point if none was provided.

Since: 3.0.0