(m: Mat4, angle: number)
| 220 | } |
| 221 | |
| 222 | export 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 | |
| 228 | export function mat4Perspective(fovy: number, aspect: number, near: number, far: number): Mat4 { |
| 229 | const f = 1.0 / Math.tan(fovy / 2); |
no test coverage detected