(x, y)
| 842 | return new Matrix2(basis1, basis2); |
| 843 | } |
| 844 | constructor(x, y){ |
| 845 | this.ptr = typeof x === "number" ? x : alloc(16); |
| 846 | this.#internal = new Float32Array(memory.buffer, this.ptr, 4); |
| 847 | if (typeof x !== "number" && x !== undefined) { |
| 848 | this.x = x ?? Vector2.zero(); |
| 849 | this.y = y ?? Vector2.zero(); |
| 850 | } |
| 851 | } |
| 852 | clone() { |
| 853 | return new Matrix2(this.x, this.y); |
| 854 | } |