utils.js 237 B

123456789101112
  1. function isStable(res) {
  2. const { x, y, z } = res;
  3. console.log('x:', x, 'y:', y, 'z:', z);
  4. if (Math.abs(x) < 0.1 && Math.abs(y) < 0.1 && Math.abs(z) < 0.1) {
  5. return true;
  6. }
  7. return false;
  8. }
  9. module.exports = {
  10. isStable,
  11. };