How to vSize a vector?

How to get a float variable out of 2 vectors, which represents the distance between these 2.
Instead of VSize(v1 - v2) and you get a float which is the maths behind of the function?

I think this is it:



xsquared = (v1.X - v2.X) ** 2;
ysquared = (v1.Y - v2.Y) ** 2;
zsquared = (v1.Z - v2.Z) ** 2;
distance = sqrt(xsquared + ysquared + zsquared);


You are awsome ^^ thanks