Home > @josh-brown/vector > FloatVector > projectOnto
Returns a new vector in the direction of u but with magnitude equal to the amount of the original vector that lies in that direction
Signature:
projectOnto(u: Vector<number>): Vector<number>;|
Parameter |
Type |
Description |
|---|---|---|
|
u |
Vector<number> |
The vector on which to project this |
Returns:
Vector<number>
This vector projected onto u