Hand-written by Joseph San Nicolas, Roblox Developer
Vector3int16
Constructors
| Name | Description |
| 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
| Name | Type | Description |
| X | number | The x-coordinate of the Vector3int16, also accessible in its lower-case variant. |
| Y | number | The y-coordinate of the Vector3int16, also accessible in its lower-case variant. |
| Z | number | The z-coordinate of the Vector3int16, also accessible in its lower-case variant. |