setFromCartesianCoords method
Implementation
Spherical setFromCartesianCoords(num x, num y, num z) {
radius = Math.sqrt(x * x + y * y + z * z);
if (radius == 0) {
theta = 0;
phi = 0;
} else {
theta = Math.atan2(x, z);
phi = Math.acos(MathUtils.clamp(y / radius, -1, 1));
}
return this;
}