Solution

For VS
Added magnitude() function

magnitude() function returns the magnitude of the activating vector.
The magnitude of a vector is simply sqrt(x^2+y^2+z^2) (using math
notation).