home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / complex-lib / cxsub.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-07-14  |  320 b   |  22 lines

  1. /*
  2.     CxSub -- subtract one complex from another
  3.  
  4.     CxSub( &a, &b )    subtracts  b  from  a  and returns  &a
  5.  
  6.     last edit:    86/01/04    D A Gwyn
  7.  
  8.     SCCS ID:    @(#)cxsub.c    1.1
  9. */
  10.  
  11. #include    <complex.h>
  12.  
  13. complex *
  14. CxSub( ap, bp )
  15.     register complex    *ap, *bp;    /* (may coincide) */
  16.     {
  17.     ap->re -= bp->re;
  18.     ap->im -= bp->im;
  19.  
  20.     return ap;
  21.     }
  22.