toF64()
Function in Builtins
Widen f32 to f64, exactly (the result is the pair (x, 0.0)).
import { toF64 } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const toF64: (x: ReadonlyNode<"f32"> | number) => Node<"f64">Parameters
xReadonlyNode<'f32'> | number
Return value
Node<'f64'>
Description
Widen f32 to f64, exactly (the result is the pair (x, 0.0)). This is the explicit form
of the widening the arithmetic methods apply on their own when an f32 meets an f64.
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. |
In the guide
Source
src/core/ir/node.ts, line 2380, at commit 26de7be8