I am going though a functional source that havehas 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());
}
};
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()vSize2()
and vSize()vSize()
). It seems to me that it is calculating the length between the point and the origin.
Any thoughts ?