Vector3int16: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
No edit summary
>Crazypotato4
→‎Operators: Numbers do not have any place in legitimate English grammar.
 
Line 34: Line 34:
| {{type|Vector3int16}} + {{type|Vector3int16}} || returns Vector3int16 translated (slid) by Vector3int16
| {{type|Vector3int16}} + {{type|Vector3int16}} || returns Vector3int16 translated (slid) by Vector3int16
|-
|-
| {{type|Vector3int16}} - {{type|Vector3int16}} || returns Vector3int16 translated (slid) by -Vector3int16 (also gives relative position of 1 to the other)
| {{type|Vector3int16}} - {{type|Vector3int16}} || returns Vector3int16 translated (slid) by -Vector3int16 (also gives relative position of one to the other)
|-
|-
| {{type|Vector3int16}} * {{type|Vector3int16}} || returns Vector3int16 with each component multiplied by corresponding component
| {{type|Vector3int16}} * {{type|Vector3int16}} || returns Vector3int16 with each component multiplied by corresponding component

Latest revision as of 22:18, 24 April 2012

Vector3int16 is a variant of the Vector3 datatype. Vector3int16, as its name implies, is a type whose coordinates are stored as 16 bit signed integers. What does this mean? It means that the coordinates of a Vector3int16 must be in the range of -32767 to 32767. Additionally, the Vector3int16 datatype is stripped down in terms of functionality. Currently, it is exclusively used for creating a Region3int16 which in turn is used for using some of the terrain object's methods.

Constructors

Constructor Description
Vector3int16.new(x, y, z) Creates a new Vector3int16 using coordinates x, y, z.

Methods

Unlike the Vector3 datatype, Vector3int16 does not have any known methods.

Properties

All of these properties are Read Only (you can't just set them Vector3int16.x = 5, it doesn't work) but you can create new vectors with such changes, or apply an operation, seen in the next section.

Property Type Description
Vector3int16.x number The x-coordinate
Vector3int16.y number The y-coordinate
Vector3int16.z number The z-coordinate

Operators

Unlike Vector3, you can only operate on a Vector3int16 with another Vector3int16.

Operator Description
Vector3int16 + Vector3int16 returns Vector3int16 translated (slid) by Vector3int16
Vector3int16 - Vector3int16 returns Vector3int16 translated (slid) by -Vector3int16 (also gives relative position of one to the other)
Vector3int16 * Vector3int16 returns Vector3int16 with each component multiplied by corresponding component
Vector3int16 / Vector3int16 returns Vector3int16 with each component divided by corresponding component

See also