Creates a 2D vector.
The x-coordinate of the vector.
Optional
The y-coordinate of the vector. If not provided, it will default to the value of x.
x
A new Vector object representing the 2D vector.
Creates a 2D vector.