Skip to content

f32

f32(v?): number

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

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

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

number | boolean

number

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