mat2f64
On this page

mat2f64()

Function in Builtins

An emulated-double mat2x2<f64> constructor, column-major: one vec2<f64> argument per column, the same convention as WGSL's mat2x2.

import { mat2f64 } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const mat2f64: (
cols_0: Mat64Col<2>,
cols_1: Mat64Col<2>,
) => Node<"mat2x2<f64>">

Parameters

...cols [Mat64Col<2>, Mat64Col<2>]

Return value

Node<'mat2x2<f64>'>

Description

Use transformMat64 and mulMat64 for the f64 matrix-vector and matrix-matrix products; the generic .mul rejects a matrix operand.

Examples

Example

import { mat2f64, vec2f64 } from 'typeshade'
const m = mat2f64(vec2f64(1, 2), vec2f64(3, 4)) // Node<'mat2x2<f64>'>

See also

Source

src/core/ir/node.ts, line 2680, at commit 26de7be8

Edit this page Report a problem