I am going though a functional source that have the following class:
class Point3D
{
int x ,y,z;
int vSize2() const
{
return x*x +
y*y +
z*z;
}
int vSize() const
{
return sqrt(vSize2());
}
};
It is hard to understand the functionalities of the above two functions (vSize2() and vSize()). It seems to me that it is calculating the length between the point and the origin.
Any thoughts ?