vec2f64()
함수, 내장 함수 분류
An emulated-double vec2<f64> constructor.
import { vec2f64 } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
const vec2f64: (...a: Vec64Arg[]) => Node<"vec2<f64>">매개변수
...aVec64Arg[]
반환값
Node<'vec2<f64>'>
설명
A bare number component splits without loss
into its (hi, lo) f32 pair when the module is built (a JS number already is an f64), and an
f32 node component widens exactly, so mixed arguments such as vec2f64(x64, 0) are fine. One argument splats to both components, WGSL-style. Use it over vec2 wherever the
value needs more than the seven or so significant digits of f32.
예제
예제
import { vec2f64 } from 'typeshade'
const p = vec2f64(1e8 + 0.5, 2) // Node<'vec2<f64>'>: exact, where an f32 vec2 would round관련 가이드
함께 보기
소스
src/core/ir/node.ts, 2631행, 커밋 c66579bf 기준