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.
Parameters
Section titled “Parameters”number
| boolean
Returns
Section titled “Returns”number
Examples
Section titled “Examples”const value = f32(); // 0
const value = f32(1.23); // 1.23
const value = f32(true); // 1