Calculates a vector with the inputted magnitude.