I am trying to calculate drag in 3D, and I came across the formula
$$F_d = \dfrac{1}{2}\cdot C_d \cdot \rho \cdot v(t)^2 \cdot A$$
I understand how this formula is reached, as a proof is given here https://sciencing.com/how-to-calculate-drag-force-13710258.html.
However, that is for calculating the magnitude of the force, whereas I want to calculate it as a vector since $v(t)$ should also be a vector.
I stumbled across https://pdfs.semanticscholar.org/3fb8/577794f3eb802de98aadc06b0a1120a00c02.pdf, where it seems like they use the equation
$$F_d = \dfrac{1}{2}\cdot C_d \cdot \rho \cdot v(t) \cdot |v(t)| \cdot A$$
Why does this work?
To get the drag as a vector, just multiply $F_d$ with a unit vector pointing in the direction of the wind: $$ \vec{F}_d = F_d \frac{\vec{v}}{|v|} = \frac{1}{2} C_d \rho |v|^2 A \cdot \frac{\vec{v}}{|v|} = \frac{1}{2} C_d \rho |v|\vec{v} A . $$