mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
beginning to fold in HOD code with jeremy tinker's approval
This commit is contained in:
parent
d8108d3a8e
commit
44cd0eb71f
95 changed files with 21950 additions and 0 deletions
26
c_tools/hod/complex.h
Normal file
26
c_tools/hod/complex.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* CAUTION: This is the ANSI C (only) version of the Numerical Recipes
|
||||
utility file complex.h. Do not confuse this file with the same-named
|
||||
file complex.h that is supplied in the 'misc' subdirectory.
|
||||
*That* file is the one from the book, and contains both ANSI and
|
||||
traditional K&R versions, along with #ifdef macros to select the
|
||||
correct version. *This* file contains only ANSI C. */
|
||||
|
||||
#ifndef _NR_COMPLEX_H_
|
||||
#define _NR_COMPLEX_H_
|
||||
|
||||
#ifndef _FCOMPLEX_DECLARE_T_
|
||||
typedef struct FCOMPLEX {float r,i;} fcomplex;
|
||||
#define _FCOMPLEX_DECLARE_T_
|
||||
#endif /* _FCOMPLEX_DECLARE_T_ */
|
||||
|
||||
fcomplex Cadd(fcomplex a, fcomplex b);
|
||||
fcomplex Csub(fcomplex a, fcomplex b);
|
||||
fcomplex Cmul(fcomplex a, fcomplex b);
|
||||
fcomplex Complex(float re, float im);
|
||||
fcomplex Conjg(fcomplex z);
|
||||
fcomplex Cdiv(fcomplex a, fcomplex b);
|
||||
float Cabs(fcomplex z);
|
||||
fcomplex Csqrt(fcomplex z);
|
||||
fcomplex RCmul(float x, fcomplex a);
|
||||
|
||||
#endif /* _NR_COMPLEX_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue