
Victoria V. answered 05/10/19
20+ years teaching Calculus
Here is the solution to what I think you are asking.
You want a vector, that may not start out with a magnitude of 1, but has the direction you want it to be in, so you need the vector you have, in the correct direction, to be accurately reduced (or enlarged) to have a magnitude of 1 in the exact same direction as the larger vector you currently have.
If this is an accurate description of the problem, then what you need is what math people call a UNIT VECTOR. It is a vector in the same direction as the original, but with a magnitude of just 1.
So, if you start with the vector <x,y> going in direction and θ having a magnitude of √(x2+y2)
to get a unit vector (or a heading vector) just divide your vector <x,y> by its magnitude.
So for example: v = <3,4>, a unit vector in the same direction would be < 3/5, 4/5 >
Notice the magnitude (3/5)2 + (4/5)2 = 9/25 + 16/25 = 25/25 = 1
To show that it is in the same direction, tan(θ)=y/x
Our orig has tan(θ) = 4/3, our unit vector has tan(θ) = ( (4/5) / (3/5) ) = (0.8/0.6) = 4/3
So your unit vector has magnitude of 1 and the same direction as the original vector.
Is that what you needed????? I am curious to know, please let me know if that was what you were looking for.