# Vector2

`import { Vector2 } from "destack:math";`

Two-dimensional vector.

```ds title="Vector2"
export struct Vector2<T: Numeric> {
    x: T;
    y: T;
}
```

[language/library/src/math/linear.ds:7:13](https://github.com/destack-sh/destack/blob/main/language/library/src/math/linear.ds#L7-L13)

## Members

### `x: T`

The x component.

### `y: T`

The y component.
