u32
u32(
v?):number
Defined in: packages/typegpu/src/data/numeric.ts:92
A schema that represents an unsigned 32-bit integer value. (equivalent to u32 in WGSL)
Can also be called to cast a value to an u32 in accordance with WGSL casting rules.
Parameters
Section titled “Parameters”number | boolean
Returns
Section titled “Returns”number
Examples
Section titled “Examples”const value = u32(); // 0const value = u32(7); // 7const value = u32(3.14); // 3const value = u32(-1); // 4294967295const value = u32(-3.1); // 0