Add the squares of the position e.g(x^2+y^2+z^2)
double lengthSq () { return x * x + y * y + z * z; }