Vector4 - Mtax-Development/GML-OOP GitHub Wiki
Constructs a Vector container for two x and y coordinate pairs.
It is a universal constructor containing two sets of values expressing two points on a two-dimensional plane, horizontal as x and vertical as y. This is the minimum information request to construct a rectangular shape in such space, which is the usual use of this constructor.
Vector2 is a similar constructor with only one set of such values.
It is a universal constructor containing two sets of values expressing two points on a two-dimensional plane, horizontal as x and vertical as y. This is the minimum information request to construct a rectangular shape in such space, which is the usual use of this constructor.
Vector2 is a similar constructor with only one set of such values.
Destruction |
Elements |
Garbage Collection |
None |
Name |
Type |
Default |
Modifiable |
x1 |
{real} |
undefined |
Yes |
y1 |
{real} |
undefined |
Yes |
x2 |
{real} |
undefined |
Yes |
y2 |
{real} |
undefined |
Yes |
Name |
Arguments |
Argument note |
Four numbers |
||
One number for all values |
{real} value |
|
Number pair |
First number will be set to x1 and y1.Second number will be set to x2 and y2. |
|
From array |
array {real[]} |
Array positions will be applied depending on its size: 1: array[0] will be set to all values. 2: array[0] will be set to x1 and y1, array[1] will be set to
x2 and y2. 4+: array[0] will be set to x1, array[1] will be set to y1, array[2] will be set to x2, array[3] will be set to y2. |
From Scale or Vector2 |
||
Vector2 pair |
||
Empty |
||
Constructor copy |
other {Vector4} |