Define a readonly struct Vector2 with float X and Y.
Almost every game engine starts with a 2D vector value type. Use a `readonly struct` so it lives on the stack and is immutable.
```csharp
public readonly struct Vector2
{
public float X { get; }
public float Y { get; }
public Vector2(float x, float y) { X = x; Y = y; }
}
```Sign in to save your code and track progress across devices.