Given N-dimensional vectors $a$ and $b$, I want to compute a new vector $c$ that has the direction of $a$ and the magnitude of $b$.
In 2 dimensions, this is solvable with trig:
\begin{align} \rho &= ||y||_2 \\ \theta &= \tan^{-1}(\frac{a_y}{a_x}) \\ c_x &= \cos(\theta) * \rho \\ c_y &= \sin(\theta) * \rho \end{align}
How do I compose a general solution that works over any amount of spatial dimensions?
$$ \upsilon = \frac{a}{||a||} $$
$$ c = ||b|| * \upsilon $$