home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / f2c / f77lib / r_abs.c < prev    next >
C/C++ Source or Header  |  2000-06-22  |  139b  |  13 lines

  1. #include "f2c.h"
  2.  
  3. #ifdef KR_headers
  4. double r_abs(x) real *x;
  5. #else
  6. double r_abs(real *x)
  7. #endif
  8. {
  9. if(*x >= 0)
  10.     return(*x);
  11. return(- *x);
  12. }
  13.