How to calculate a vector from an angle with another vector in 2D?

Viewed 13879

I know I should know this, but I just can't figure it out/find the solution. I can do it by hand, but I can't put it in an algorithm... (working in c++, but pseudocode should be fine).

I have a vector, and I want to find another vector based on the angle with it.

Angle with two vectors

v is known, angle alpha is known and the magnitude of w is known. How can I find w?

Thanks!

2 Answers
Related