* Vector dot product * * @param vector The vector used for the multiplication. * @returns The resulting dot product.
(vector)
| 111 | * @returns The resulting dot product. |
| 112 | */ |
| 113 | dotProduct(vector) { |
| 114 | return this.x * vector.x + this.y * vector.y |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * Vector rotation (see https://en.wikipedia.org/wiki/Rotation_matrix) |