Phaser API Documentation

  Version: 

Member of: Phaser.Math.Vector2

limit(max)

Description:

Limit the length (or magnitude) of this Vector.

Parameters:

name type description
max number

The maximum length.

Returns:
Description:

This Vector2.

Since: 3.23.0
Source: src/math/Vector2.js (Line 624)