(other)
| 1129 | } |
| 1130 | } |
| 1131 | add(other) { |
| 1132 | if (typeof other === "number") { |
| 1133 | return new Matrix3(this.x.add(other), this.y.add(other), this.z.add(other)); |
| 1134 | } |
| 1135 | return new Matrix3(matrix3add(this.ptr, other.ptr)); |
| 1136 | } |
| 1137 | sub(other) { |
| 1138 | if (typeof other === "number") { |
| 1139 | return new Matrix3(this.x.sub(other), this.y.sub(other), this.z.sub(other)); |