[ theta, phi ] = truncateAngles(obj, theta, phi ) theta, phi will now be in 0-2pi and 0-pi deg range (