intLit
이 페이지에서

intLit()

함수, 출력 분류

Spell v as the body of an i32 or u32 literal (no suffix), in the form WGSL and GLSL share.

import { intLit } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

function intLit(v: number, scalar: 'i32' | 'u32'): string

매개변수

v number
scalar 'i32' | 'u32'

반환값

string

예외

SD0017

SD0017 if v is not an integer or lies outside the 32-bit range of scalar. WGSL rejects 2147483648 as an i32 literal, and a fractional or out-of-range value printed verbatim is a compile error on both targets.

소스

src/core/backends/wgsl.ts, 158행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고