Added a function for making a scaled copy of a vector.