mat4x4
On this page

mat4x4

Function

Builds a mat4x4, 4 columns of 4 components in column-major order, from 4 vec4 columns, from 16 components column by column, from a larger matrix by truncation, or with no arguments for the zero matrix (§40).

The signature and the sentence under each name are the compiler's own text at commit 26de7be8.

Syntax

declare function mat4x4(): mat4x4
declare function mat4x4(c0: vec4, c1: vec4, c2: vec4, c3: vec4): mat4x4
declare function mat4x4(e0: number, e1: number, e2: number, e3: number, e4: number, e5: number, e6: number, e7: number, e8: number, e9: number, e10: number, e11: number, e12: number, e13: number, e14: number, e15: number): mat4x4
declare function mat4x4(m: mat4x4): mat4x4

A number in a parameter or a return position is the scalar slot. The ambient file declares a GPU scalar as a branded number whose brand is optional, so a literal and any branded scalar both fill it.

type f32 = number & { readonly [f32Tag]?: true }

A declaration you write still needs a width, and a bare number on a field or a parameter is refused; the TypeScript constructs page carries that row with the compiler's own message.

Parameters

  • c0 optional vec4
  • e0 optional number
  • m optional mat4x4
  • c1 optional vec4
  • e1 optional number
  • c2 optional vec4
  • e2 optional number
  • c3 optional vec4
  • e3 optional number
  • e4 optional number
  • e5 optional number
  • e6 optional number
  • e7 optional number
  • e8 optional number
  • e9 optional number
  • e10 optional number
  • e11 optional number
  • e12 optional number
  • e13 optional number
  • e14 optional number
  • e15 optional number

Return value

mat4x4

Description

It is square, so determinant applies and transpose maps it to itself.

See also

Edit this page Report a problem