matT()
함수, 타입 분류
Any matCxR<f32> or matCxR<f64>: cols columns of rows components each, column-major as both targets are.
import { matT } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
const matT: ( cols: 2 | 3 | 4, rows: 2 | 3 | 4, elem?: "f32" | "f64",) => Extract<ShaderType, { kind: "mat"; }>매개변수
cols2 | 3 | 4Number of columns — the
CofmatCxR.rows2 | 3 | 4Number of rows — the
RofmatCxR, and the component count of one column.elem선택 사항'f32' | 'f64''f32'for a native matrix,'f64'for the emulated-double one (square only).
반환값
Extract<ShaderType, { kind: 'mat' }>
설명
The named constants above are the shapes with a spelling of their own; this is how the front end and a host build the other six.
예제
예제
import { matT, typeKey } from 'typeshade'
typeKey(matT(2, 3)) // 'mat2x3<f32>'소스
src/core/ir/types.ts, 535행, 커밋 c66579bf 기준