bitcastU32
On this page

bitcastU32()

Function in Builtins

Reinterpret the bit pattern of an f32 as a u32.

import { bitcastU32 } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const bitcastU32: (v: ReadonlyNode<"f32">) => Node<"u32">

Parameters

v ReadonlyNode<'f32'>

Return value

Node<'u32'>

Description

Emitted as bitcast<u32>(x) on WGSL and floatBitsToUint(x) on GLSL.

Targets

TargetSupportNotes
WGSL (WebGPU) Supported

bitcast<u32>(v).

GLSL ES 3.00 (WebGL2) Supported

floatBitsToUint(v).

CPU oracle Supported

Evaluated in f64 by the oracle.

Source

src/core/ir/node.ts, line 1924, at commit 26de7be8

Edit this page Report a problem