Vector2

constructor(x: Float, y: Float)

Creates a new Vector2 instance with the specified x, y components.

Parameters

x

The x position.

y

The y position.


constructor(value: Float)

Initializes a Vector2 instance with a single float value.

Parameters

value

The float value that will be set to x and y.


constructor(other: Vector2)

Initializes a Vector2 instance from another Vector2 instance.

Parameters

other

The Vector2 instance used to initialize a new Vector2 instance.


constructor(other: Vector3)

Initializes a Vector2 instance from a Vector3 instance's x and y.

Parameters

other

The Vector3 instance used to initialize Vector2.