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

Function mat4RotateX

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

Source from the content-addressed store, hash-verified

208}
209
210export function mat4RotateX(m: Mat4, angle: number): Mat4 {
211 const c = Math.cos(angle), s = Math.sin(angle);
212 const rot: Mat4 = [1,0,0,0, 0,c,s,0, 0,-s,c,0, 0,0,0,1];
213 return mat4Multiply(m, rot);
214}
215
216export function mat4RotateY(m: Mat4, angle: number): Mat4 {
217 const c = Math.cos(angle), s = Math.sin(angle);

Callers 2

trsToMat4Function · 0.90
trsToMat4Function · 0.90

Calls 1

mat4MultiplyFunction · 0.85

Tested by

no test coverage detected