Skip to content

i32

i32(v?): number

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

A schema that represents a signed 32-bit integer value. (equivalent to i32 in WGSL)

Can also be called to cast a value to an i32 in accordance with WGSL casting rules.

number | boolean

number

const value = i32(); // 0
const value = i32(3.14); // 3
const value = i32(-3.9); // -3
const value = i32(10000000000) // 1410065408