Returns a Vector2 containing the x and y position of the given index in a width x height sized grid.
width
height
For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.
If the given index is out of range an empty Vector2 is returned.
The position within the grid to get the x/y value for.
The width of the grid.
The height of the grid.
Optional
An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.
Returns a Vector2 containing the x and y position of the given index in a
widthxheightsized grid.For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.
If the given index is out of range an empty Vector2 is returned.