Skip to content

matBase

A type which every matrix is assignable to. In most cases the union m2x2f | m3x3f | m4x4f is preferred, but when an implementation uses overloaded operators and is generic on the type, this makes the type checking much more laid back.

readonly [$internal]: true

packages/typegpu/src/data/wgslTypes.ts:476


readonly kind: "mat4x4f" | "mat2x2f" | "mat3x3f"

packages/typegpu/src/data/wgslTypes.ts:477

[operatorMinus](lhs, rhs): matBase

matBase

matBase

matBase

matInfixNotation.[operatorMinus]

packages/typegpu/src/data/wgslTypes.ts:87


[operatorPlus](lhs, rhs): matBase

matBase

matBase

matBase

matInfixNotation.[operatorPlus]

packages/typegpu/src/data/wgslTypes.ts:86


[operatorStar](lhs, rhs): matBase

number | matBase

number | matBase

matBase

matInfixNotation.[operatorStar]

packages/typegpu/src/data/wgslTypes.ts:88

[operatorStar](lhs, rhs): vecBase

matBase

vecBase

vecBase

matInfixNotation.[operatorStar]

packages/typegpu/src/data/wgslTypes.ts:89

[operatorStar](lhs, rhs): vecBase

vecBase

matBase

vecBase

matInfixNotation.[operatorStar]

packages/typegpu/src/data/wgslTypes.ts:90


add(other): matBase

matBase

matBase

matInfixNotation.add

packages/typegpu/src/data/wgslTypes.ts:81


mul(other): matBase

number | matBase

matBase

matInfixNotation.mul

packages/typegpu/src/data/wgslTypes.ts:83

mul(other): vecBase

vecBase

vecBase

matInfixNotation.mul

packages/typegpu/src/data/wgslTypes.ts:84


sub(other): matBase

matBase

matBase

matInfixNotation.sub

packages/typegpu/src/data/wgslTypes.ts:82