home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume10 / complex-lib / cxcons.c < prev    next >
C/C++ Source or Header  |  1987-07-14  |  329b  |  23 lines

  1. /*
  2.     CxCons -- construct a complex from real and imaginary parts
  3.  
  4.     CxCons( &c, re, im )    makes  c = re + i im  and returns  &c
  5.  
  6.     last edit:    86/01/04    D A Gwyn
  7.  
  8.     SCCS ID:    @(#)cxcons.c    1.1
  9. */
  10.  
  11. #include    <complex.h>
  12.  
  13. complex *
  14. CxCons( cp, re, im )
  15.     register complex    *cp;
  16.     double            re, im;
  17.     {
  18.     cp->re = re;
  19.     cp->im = im;
  20.  
  21.     return cp;
  22.     }
  23.