You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > Vect

19.2.1 Vect

vector = physics.Vect(x, y)
vector = physics.Vect(angle)
vector = physics.Vect(vect)

Parameter

Type

Description

x

in number

The x component of the vector

y

in number

The y component of the vector

angle

in number

An angle in radians

vect

in physics.Vect

A vector

vector

out physics.Vect

A vector

Creates a vector with initial x and y component values. The second form creates a unit vector pointing in direction angle. The third form creates a copy of the input vector.

Introduced in platform.apiLevel = '2.0'