MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / mat4RotateZ

Function mat4RotateZ

src/math/index.ts:222–226  ·  view source on GitHub ↗
(m: Mat4, angle: number)

Source from the content-addressed store, hash-verified

220}
221
222export function mat4RotateZ(m: Mat4, angle: number): Mat4 {
223 const c = Math.cos(angle), s = Math.sin(angle);
224 const rot: Mat4 = [c,s,0,0, -s,c,0,0, 0,0,1,0, 0,0,0,1];
225 return mat4Multiply(m, rot);
226}
227
228export function mat4Perspective(fovy: number, aspect: number, near: number, far: number): Mat4 {
229 const f = 1.0 / Math.tan(fovy / 2);

Callers 2

trsToMat4Function · 0.90
trsToMat4Function · 0.90

Calls 1

mat4MultiplyFunction · 0.85

Tested by

no test coverage detected