---
title: "vec2fT: constant in Types, TypeShade API reference"
description: "vec2fT, a constant in Types. A native vec2<f32>, the most common vector type in the DSL: screen and UV coordinates and 2D positions, such as a uv: location(0…"
url: https://typeshade.dev/api/vec2ft/
language: en
---

# `vec2fT`

Constant in Types

A native `vec2<f32>`, the most common vector type in the DSL: screen and UV coordinates and 2D positions, such as a uv: location(0, `vec2fT`) fragment-input field or a resolution: `vec2fT` uniform.

`import { vec2fT } from 'typeshade/core/ir'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
const vec2fT: { readonly kind: "vec"; readonly n: 2; readonly elem: "f32"; }
```

## Description

Build a value with the [`vec2`](https://typeshade.dev/api/vec2/) constructor; use [`vec2f64T`](https://typeshade.dev/api/vec2f64t/) instead when the value needs more precision than `f32` offers.

## See also

- [`vec2`](https://typeshade.dev/api/vec2/)
- [`vec2f64T`](https://typeshade.dev/api/vec2f64t/)

## Source

[`src/core/ir/types/vector-types.ts`, line 10](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/types/vector-types.ts#L10), at commit af54ddad5
