lengthSq method

double lengthSq()

Add the squares of the position e.g(x^2+y^2+z^2)

Implementation

double lengthSq () {
  return x * x + y * y + z * z;
}