Skip to main content

Vec3 Class

Description:

  A class for creating Vec3 objects.

__call

Type: Metamethod.

Description:

  Creates a new Vec3 object with the given x, y and z components.

Signature:

metamethod __call: function(
self: Vec3Class,
x: number,
y: number,
z: number
): Vec3

Usage:

local newVec = Vec3(10, 20, 30)

Parameters:

ParameterTypeDescription
xnumberThe x-component of the new vector.
ynumberThe y-component of the new vector.
znumberThe z-component of the new vector.

Returns:

Return TypeDescription
Vec3The new Vec3 object.