length method
Add the lenght of the positions e.g(sqrt(x^2+y^2+z^2))
Implementation
double length () {
return math.sqrt( x * x + y * y + z * z);
}
Add the lenght of the positions e.g(sqrt(x^2+y^2+z^2))
double length () {
return math.sqrt( x * x + y * y + z * z);
}