(other)
| 889 | } |
| 890 | } |
| 891 | add(other) { |
| 892 | if (typeof other === "number") { |
| 893 | return new Matrix2(this.x.add(other), this.y.add(other)); |
| 894 | } |
| 895 | return new Matrix2(matrix2add(this.ptr, other.ptr)); |
| 896 | } |
| 897 | sub(other) { |
| 898 | if (typeof other === "number") { |
| 899 | return new Matrix2(this.x.sub(other), this.y.sub(other)); |