/* * File: * complex.h * Author: * Samuel A. Rebelsky * Version: * 1.0 of March 2003 * Summary: * Type and function declarations for a simple complex type. */ #ifndef _COMPLEX_H_ #define _COMPLEX_H_ /* Complex numbers contain a real and imaginary part. */ typedef struct complex { double real; double imaginary; } complex; /* * Procedure: * cmult * Parameters: * a, a complex number * b, a complex number * Purpose: * Multiply a and b. * Produces * c, a complex number. * Preconditions: * [Standard] * Postconditions: * c = a*b */ extern complex cmult(complex a, complex b); #endif /* _COMPLEX_H_ */