Vector3

From Wake
Jump to: navigation, search

Class: Vector3

Type: native

Can Construct: yes

Description

Provides a Vector3 class and mathematical functions.

Conversions

Almost all Vector3 functions accept either an instance of a Vector3 or a table of length 3 as shorthand.

Functions

 Description
Vector3.newConstructor.
Vector3:applyCreate a new vector by applying a function to each element of the current vector.
Vector3:crossCalculate the cross product between two vectors.
Vector3:distanceCalculate the distance between two vectors.
Vector3:dotCalculate the dot product between two vectors.
Vector3:getGet an element from a vector.
Vector3:lengthCalculate the length of a vector.
Vector3:normalizeCalculate the normalized form of a vector.
Vector3:reflectCalculate the reflection direction.
Vector3:refractCalculate the refraction vector.
Vector3:setSet the value of an element in a vector.
Vector3:setAllSet all values contained in a vector.
Vector3:tableGet the table representation of a vector.