Vector3int16

Constructors

NameDescription
new(x: number,y: number,z: number)Returns a Vector3int16 from the given x, y, and z components. Non-integer components are rounded down. Each component must fall within the signed 16-bit integer range of -32,768 to 32,767; values outside this range cause integer overflow.

Code Snippet

local voxelPosition = Vector3int16.new(4, 10, -7)
print(voxelPosition.X, voxelPosition.Y, voxelPosition.Z) --> 4  10  -7

local offset = Vector3int16.new(1, 0, 0)
print(voxelPosition + offset) --> 5, 10, -7

Properties

NameTypeDescription
XnumberThe x-coordinate of the Vector3int16, also accessible in its lower-case variant.
YnumberThe y-coordinate of the Vector3int16, also accessible in its lower-case variant.
ZnumberThe z-coordinate of the Vector3int16, also accessible in its lower-case variant.