Calculating a velocity given speed and direction