* Multiplies a vector or a number to a vector. * @param {Vector | number} a: Vector or number to multiply * @param {Vector} b: Vector to multiply
(v: Vector | number)
| 58 | * @param {Vector} b: Vector to multiply |
| 59 | */ |
| 60 | multiply(v: Vector | number) { |
| 61 | if (v instanceof Vector) return new Vector(this.x * v.x, this.y * v.y, this.z * v.z); |
| 62 | else return new Vector(this.x * v, this.y * v, this.z * v); |
| 63 | } |
| 64 | /** |
| 65 | * Divide this vector by a vector or a number. |
| 66 | * @param {Vector | number} a: Vector or number to divide |