Finding the vector with a given magnitude and direction of another vector