Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Point

<static> SetMagnitude(point, magnitude)

Description:

Changes the magnitude (length) of a two-dimensional vector without changing its direction.

Parameters:

name type description
point Phaser.Geom.Point

The Point to treat as the end point of the vector.

magnitude number

The new magnitude of the vector.

Returns:
Description:

The modified Point.

Since: 3.0.0