f64Parts()
Function in Builtins
The (hi, lo) pair of an f64 as a plain vec2<f32>, for storing an f64 into a vec2 buffer field or stage output.
import { f64Parts } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const f64Parts: (x: ReadonlyNode<"f64">) => Node<"vec2<f32>">Parameters
xReadonlyNode<'f64'>
Return value
Node<'vec2<f32>'>
Description
The (hi, lo) pair of an f64 as a plain vec2<f32>, for storing an f64 into a vec2
buffer field or stage output. It costs nothing, since an emitted f64 already is its pair;
f64FromParts(v.x, v.y) restores it.
Targets
| Target | Support | Notes |
|---|---|---|
| WGSL (WebGPU) | Emulated | Rewritten by |
| GLSL ES 3.00 (WebGL2) | Emulated | Rewritten by |
| CPU oracle | Supported | Evaluated in f64 by the oracle. |
Source
src/core/ir/node.ts, line 2396, at commit 26de7be8