home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / graphicgems4.lha / GemsIV / vec_mat / ray / solver.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-06  |  492 b   |  16 lines

  1. /****************************************************************
  2. *                                *
  3. * Polynomial root finder (polynoms up to degree 4)        *
  4. * AUTHOR: Jochen SCHARZE (See 'Cubic & Quartic Roots' in    *
  5. *              'Graphics Gems 1', AP)        *
  6. *                                *
  7. ****************************************************************/
  8.  
  9. #include <math.h>
  10. #define EQN_EPS 1e-9
  11.  
  12. int isZero(double x);
  13. int solveQuadric(double c[3], double s[2]);
  14. int solveCubic(double c[4], double s[3]);
  15. int solveQuartic(double c[5], double s[4]);
  16.