Phaser API Documentation

  Version: 
<static> Random(triangle, [out])

Description:

Returns a random Point from within the area of the given Triangle.

Parameters:

name type arguments description
triangle Phaser.Geom.Triangle

The Triangle to get a random point from.

out Phaser.Geom.Point <optional>

The Point object to store the position in. If not given, a new Point instance is created.

Returns:
Description:

A Point object holding the coordinates of a random position within the Triangle.

Since: 3.0.0