(x, y, z, w9)
| 1374 | return m; |
| 1375 | } |
| 1376 | constructor(x, y, z, w9){ |
| 1377 | this.ptr = typeof x === "number" ? x : alloc(64); |
| 1378 | this.#internal = new Float32Array(memory.buffer, this.ptr, 16); |
| 1379 | if (typeof x !== "number" && x !== undefined) { |
| 1380 | this.x = x ?? Vector4.zero(); |
| 1381 | this.y = y ?? Vector4.zero(); |
| 1382 | this.z = z ?? Vector4.zero(); |
| 1383 | this.w = w9 ?? Vector4.zero(); |
| 1384 | } |
| 1385 | } |
| 1386 | clone() { |
| 1387 | return new Matrix4(this.x, this.y, this.z, this.w); |
| 1388 | } |