Vec2

Summary

Constructors

Vec2()
Vec2(x: float, y: float)
Vec2(data: table)

Properties

Name Type
x float
y float
z float
magnitude float

Methods

Method Returns
Distance(to: Vec2) float
Clone() Vec2

Operators

Operator Rhs Returns
+ Vec2 Vec2
- Vec2 Vec2
* Vec2 Vec2
* float Vec2
/ Vec2 Vec2
/ float Vec2
== Vec2 bool
< Vec2 bool

Static members

Name Type
Vec2.typeInfo TypeInformation
Vec2.down Vec2
Vec2.left Vec2
Vec2.negativeInfinity Vec2
Vec2.one Vec2
Vec2.positiveInfinity Vec2
Vec2.right Vec2
Vec2.up Vec2
Vec2.zero Vec2

Constructors

Vec2

Vec2()

Vec2

Vec2(x: float, y: float)

Parameters

Name Type Description
x float
y float

Vec2

Vec2(data: table)

Parameters

Name Type Description
data table

Properties

x

float

y

float

z

float

magnitude

float

Methods

Distance

Distance(to: Vec2): float

Parameters

Name Type Description
to Vec2

Returns

Type Description
float

Clone

Clone(): Vec2

Returns

Type Description
Vec2

Operators

operator+

operator+(rhs: Vec2): Vec2

Parameters

Name Type Description
rhs Vec2

Returns

Type Description
Vec2

operator-

operator-(rhs: Vec2): Vec2

Parameters

Name Type Description
rhs Vec2

Returns

Type Description
Vec2

operator*

operator*(rhs: Vec2): Vec2

Parameters

Name Type Description
rhs Vec2

Returns

Type Description
Vec2

operator*

operator*(rhs: float): Vec2

Parameters

Name Type Description
rhs float

Returns

Type Description
Vec2

operator/

operator/(rhs: Vec2): Vec2

Parameters

Name Type Description
rhs Vec2

Returns

Type Description
Vec2

operator/

operator/(rhs: float): Vec2

Parameters

Name Type Description
rhs float

Returns

Type Description
Vec2

operator==

operator==(rhs: Vec2): bool

Parameters

Name Type Description
rhs Vec2

Returns

Type Description
bool

operator<

operator<(rhs: Vec2): bool

Parameters

Name Type Description
rhs Vec2

Returns

Type Description
bool

Static members

typeInfo

TypeInformation

down

Vec2

left

Vec2

negativeInfinity

Vec2

one

Vec2

positiveInfinity

Vec2

right

Vec2

up

Vec2

zero

Vec2

Last modified April 27, 2020: Regenerate all API documentation (0b49d6b)