More actions
Add Vector2-specific methods Tags: Removed redirect 2017 source edit |
m →Fields Tag: 2017 source edit |
||
| Line 14: | Line 14: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Field !! Brief description | ! Field !! Brief description | ||
{{:Vector/FieldIndex}} | |||
|- | |- | ||
| [[#field_x|x]], [[#field_r|r]], <code>[1]</code> || First component. | | [[#field_x|x]], [[#field_r|r]], <code>[1]</code> || First component. | ||
Revision as of 04:35, 29 October 2024
For general information on vectors, see Vector and Vectors and Matrices.
A Vector2 is a vector that contains 2 numbers.
Methods
| Method | Brief description |
|---|---|
| augmented | Convert this vector into a Vector3 by appending a number. |
Fields
| Field | Brief description |
|---|---|
x, r, [1] |
First component. |
y, g, [2] |
Second component. |
Operators
| Operator | Brief description |
|---|
Methods
Vector2 methods
augmented
Converts this Vector2 into a Vector3 using the provided number as the third component.
| Arguments | Return Type |
|---|---|
augmented(number d)
|
Vector3 |
Fields
Vector2 fields
x, r, 1
Read/write number. The first component of the vector.
y, g, 2
Read/write number. The second component of the vector.