Skip to content

f16

const f16: F16

Defined in: packages/typegpu/src/data/numeric.ts:314

A schema that represents a 16-bit float value. (equivalent to f16 in WGSL)

Can also be called to cast a value to an f16.

const value = f16(); // 0
const value = f32(1.23); // 1.23
const value = f16(true); // 1
const value = f16(21877.5); // 21872