Vector2 - Mtax-Development/GML-OOP GitHub Wiki
Constructs a Vector container for x and y coordinate pair.
It is a universal constructor containing two values that can be expressed on a two-dimensional plane, horizontal as x and vertical as y. Examples of what these values represent include positioning, speed, or graphical and mathematical values.
Scale is a similar constructor with the same properties, but for a more specific purpose.
Vector4 is a similar constructor with two sets of such values.
It is a universal constructor containing two values that can be expressed on a two-dimensional plane, horizontal as x and vertical as y. Examples of what these values represent include positioning, speed, or graphical and mathematical values.
Scale is a similar constructor with the same properties, but for a more specific purpose.
Vector4 is a similar constructor with two sets of such values.
Destruction |
Elements |
Garbage Collection |
None |
Name |
Type |
Default |
Modifiable |
x |
{real} |
undefined |
Yes |
y |
{real} |
undefined |
Yes |
Name |
Arguments |
Argument note |
Two numbers |
||
One number for all values |
{real} value |
|
From array |
array {real[]} |
Array positions will be applied depending on its size:
1: array[0] will be set to x and y.
2+: array[0] will be set to x, array[1] will be set to y. |
From Scale |
scale {Scale} |
|
Empty |
||
Constructor copy |
other {Vector2} |