Skip to content

Math

Maths types shared by every schema, tuft’s in Zig. Row-major for row vectors (p * m). Radians.

A struct, 0x8 bytes, aligned to 4.

Offset Field Type
0x0 x f32
0x4 y f32
x: number
y: number

A struct, 0xc bytes, aligned to 4.

Offset Field Type
0x0 x f32
0x4 y f32
0x8 z f32
x: number
y: number
z: number

A struct, 0x10 bytes, aligned to 4.

Offset Field Type
0x0 x f32
0x4 y f32
0x8 z f32
0xc w f32
x: number
y: number
z: number
w: number

w is the real part.

A struct, 0x10 bytes, aligned to 4.

Offset Field Type
0x0 x f32
0x4 y f32
0x8 z f32
0xc w f32
x: number
y: number
z: number
w: number

m[row * 4 + column], translation in the last row.

A struct, 0x40 bytes, aligned to 4.

Offset Field Type
0x0 m f32[16]
m: Array<number>

Made with ♥ by Asgard