Vec3

Summary

Constructors

Vec3()
Vec3(x: float, y: float, z: float)
Vec3(data: table)

Properties

Name Type
x float
y float
z float
magnitude float

Methods

Method Returns
Dot(with: Vec3) float
Cross(with: Vec3) Vec3
Normalize() Vec3
Distance(to: Vec3) float
MoveTowards(to: Vec3, maxDistance: float) Vec3
Clone() Vec3

Operators

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

Static members

Name Type
Vec3.typeInfo TypeInformation
Vec3.back Vec3
Vec3.down Vec3
Vec3.forward Vec3
Vec3.left Vec3
Vec3.negativeInfinity Vec3
Vec3.one Vec3
Vec3.positiveInfinity Vec3
Vec3.right Vec3
Vec3.up Vec3
Vec3.zero Vec3

Constructors

Vec3

Vec3()

Vec3

Vec3(x: float, y: float, z: float)

Parameters

Name Type Description
x float
y float
z float

Vec3

Vec3(data: table)

Parameters

Name Type Description
data table

Properties

x

float

y

float

z

float

magnitude

float

Methods

Dot

Dot(with: Vec3): float

Parameters

Name Type Description
with Vec3

Returns

Type Description
float

Cross

Cross(with: Vec3): Vec3

Parameters

Name Type Description
with Vec3

Returns

Type Description
Vec3

Normalize

Normalize(): Vec3

Returns

Type Description
Vec3

Distance

Distance(to: Vec3): float

Parameters

Name Type Description
to Vec3

Returns

Type Description
float

MoveTowards

MoveTowards(to: Vec3, maxDistance: float): Vec3

Parameters

Name Type Description
to Vec3
maxDistance float

Returns

Type Description
Vec3

Clone

Clone(): Vec3

Returns

Type Description
Vec3

Operators

operator+

operator+(rhs: Vec3): Vec3

Parameters

Name Type Description
rhs Vec3

Returns

Type Description
Vec3

operator-

operator-(rhs: Vec3): Vec3

Parameters

Name Type Description
rhs Vec3

Returns

Type Description
Vec3

operator*

operator*(rhs: Vec3): Vec3

Parameters

Name Type Description
rhs Vec3

Returns

Type Description
Vec3

operator*

operator*(rhs: float): Vec3

Parameters

Name Type Description
rhs float

Returns

Type Description
Vec3

operator/

operator/(rhs: Vec3): Vec3

Parameters

Name Type Description
rhs Vec3

Returns

Type Description
Vec3

operator/

operator/(rhs: float): Vec3

Parameters

Name Type Description
rhs float

Returns

Type Description
Vec3

operator==

operator==(rhs: Vec3): bool

Parameters

Name Type Description
rhs Vec3

Returns

Type Description
bool

operator<

operator<(rhs: Vec3): bool

Parameters

Name Type Description
rhs Vec3

Returns

Type Description
bool

Static members

typeInfo

TypeInformation

back

Vec3

down

Vec3

forward

Vec3

left

Vec3

negativeInfinity

Vec3

one

Vec3

positiveInfinity

Vec3

right

Vec3

up

Vec3

zero

Vec3

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