User:Legend26/Test: Difference between revisions
>Flurite |
>Legend26 (→Operators: change Vector3 -> Vector3int16) |
||
(24 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
=Vector3int16= | |||
{{Map|Scripting|Data Types}} | |||
__TOC__ <!-- TOC should be below the Map template. --> | |||
{{type|Vector3int16}} is a variant of the {{type|Vector3}} datatype. {{type|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 {{type|Vector3int16}} must be in the range of -32767 to 32767. Additionally, the {{type|Vector3int16}} datatype is stripped down in terms of functionality. Currently, it is exclusively used for creating a {{type|Region3int16}} which in turn is used for using some of the {{type|instance=Terrain|terrain}} object's methods. | |||
==[[Constructors]]== | |||
{| class="wikitable" | |||
! Constructor !! Description | |||
|- | |||
| Vector3int16.new(<var>x</var>, <var>y</var>, <var>z</var>) || Creates a new {{type|Vector3int16}} using coordinates <var>x</var>, <var>y</var>, <var>z</var>. | |||
|} | |||
== Methods == | |||
Unlike the {{type|Vector3}} datatype, {{type|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. | |||
= | {| class="wikitable" | ||
! Property !! Type !! Description | |||
|- | |||
| Vector3int16.'''x''' || {{type|number}} || The x-coordinate | |||
|- | |||
| Vector3int16.'''y''' || {{type|number}} || The y-coordinate | |||
|- | |||
| Vector3int16.'''z''' || {{type|number}} || The z-coordinate | |||
|} | |||
== | == Operators == | ||
Unlike {{type|Vector3}}, you can only operate on a {{type|Vector3int16}} with another {{type|Vector3int16}}. | |||
* | {| class="wikitable" | ||
! Operator !! Description | |||
|- | |||
| {{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 with each component multiplied by corresponding component | |||
|- | |||
| {{type|Vector3int16}} / {{type|Vector3int16}} || returns Vector3int16 with each component divided by corresponding component | |||
|} | |||
== See Also == | |||
* [[Vector3]] | |||
* [[Region3]] | |||
== | |||
*[[ |
Latest revision as of 18:45, 23 April 2012
Vector3int16
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 1 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 |