Phaser API Documentation

  Version: 

Member of: Phaser.Math.Vector2

set(x, [y])

Description:

Set the x and y components of the this Vector to the given x and y values.

Parameters:

name type arguments Default description
x number

The x value to set for this Vector.

y number <optional> x

The y value to set for this Vector.

Returns:
Description:

This Vector2.

Since: 3.0.0
Source: src/math/Vector2.js (Line 116)