Class: Vector3i
Methods
Name | Description |
---|---|
:__add(other) | Vector addition by an another vector or integer |
:__div(other) | Vector division by an another vector or integer |
:__eq(other) | Equality comparison |
:__len() | Number of dimensions/elements in the vector, not the length of the vector |
:__mul(other) | Vector multplication by an another vector or integer |
:__sub(other) | Vector subtraction by an another vector or integer |
:__tostring() | Format the vector into a human readable string |
:__unm() | Unary minus of the vector |
Fields
Name | Type | Description |
---|---|---|
x | integer | |
y | integer | |
z | integer |
Method declarations
Method: __add
Vector addition by an another vector or integer
lua
function Vector3i:__add(
other
) end
Parameters:
- other (
integer|Vector3i
) - An another vector or integer to add
Returns:
- Vector3i - A new vector that is a product of addition
Method: __div
Vector division by an another vector or integer
lua
function Vector3i:__div(
other
) end
Parameters:
- other (
integer|Vector3i
) - An another vector or integer to divide with
Returns:
- Vector3i - A new vector that is a product of division
Method: __eq
Equality comparison
lua
function Vector3i:__eq(
other
) end
Parameters:
- other (Vector3i) - An another vector to compare with
Returns:
boolean
- True if this and the other vector equal
Method: __len
Number of dimensions/elements in the vector, not the length of the vector
lua
function Vector3i:__len() end
Returns:
integer
- The number of dimensions in the vector (i.e. 3)
Method: __mul
Vector multplication by an another vector or integer
lua
function Vector3i:__mul(
other
) end
Parameters:
- other (
integer|Vector3i
) - An another vector or integer to multiply with
Returns:
- Vector3i - A new vector that is a product of multplication
Method: __sub
Vector subtraction by an another vector or integer
lua
function Vector3i:__sub(
other
) end
Parameters:
- other (
integer|Vector3i
) - An another vector or integer to subtract
Returns:
- Vector3i - A new vector that is a product of subtractino
Method: __tostring
Format the vector into a human readable string
lua
function Vector3i:__tostring() end
Returns:
string
- A string representation of this vector
Method: __unm
Unary minus of the vector
lua
function Vector3i:__unm() end
Returns:
- Vector3i - The negative of the current vector
Field declarations
Field: x
Type: integer
Field: y
Type: integer
Field: z
Type: integer