* project this vector on to another vector. * @param v - The vector to project onto. * @returns Reference to this object for method chaining
(v: Vector2d | ObservableVector2d)
| 481 | * @returns Reference to this object for method chaining |
| 482 | */ |
| 483 | project(v: Vector2d | ObservableVector2d) { |
| 484 | return this.scale(this.dot(v) / v.length2()); |
| 485 | } |
| 486 | |
| 487 | /** |
| 488 | * Project this vector onto a vector of unit length.<br> |