Scaling a vector to unit length