Phaser API Documentation

  Version: 
<static> RandomOutside(outer, inner, [out])

Description:

Calculates a random point that lies within the outer Rectangle, but outside of the inner Rectangle. The inner Rectangle must be fully contained within the outer rectangle.

Parameters:

name type arguments description
outer Phaser.Geom.Rectangle

The outer Rectangle to get the random point within.

inner Phaser.Geom.Rectangle

The inner Rectangle to exclude from the returned point.

out Phaser.Geom.Point <optional>

A Point, or Point-like object to store the result in. If not specified, a new Point will be created.

Returns:
Description:

A Point object containing the random values in its x and y properties.

Since: 3.10.0