isVec64()
함수, 타입 분류
Narrows a ShaderType to the emulated-double vector arm (vec2f64T and its 3- and 4-wide siblings).
import { isVec64 } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
const isVec64: ( t: ShaderType,) => t is Extract<ShaderType, { kind: "vec64"; }>매개변수
반환값
t is Extract<ShaderType, { kind: 'vec64' }>
설명
Narrows a ShaderType to the emulated-double vector arm (vec2f64T and its 3- and
4-wide siblings). It is distinct from isVec, which matches only the native vec kind
and is false for an emulated-double vector. Component access (.comp() and swizzles)
accepts either isVec(t) || isVec64(t), since both kinds support it, each through its own
emitted form.
예제
예제
import { isVec64, vec2f64T, vec2fT } from 'typeshade'
isVec64(vec2f64T) // trueisVec64(vec2fT) // false: a native vec, use isVec for that함께 보기
소스
src/core/ir/types.ts, 1148행, 커밋 c66579bf 기준