diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-05-12 13:24:33 -0500 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2009-04-27 21:23:39 +0200 |
commit | 9129c81edd525d184c402ef35f8ad5ebabe16ed4 (patch) | |
tree | c0042735d5dfd510412db99c6656b18fb9c2f75d /Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h | |
parent | 0e08ccccb4c57e711157828c24c64b4ab139c514 (diff) |
Add IfThen pseudo-function, which expands to ?: in C.
Diffstat (limited to 'Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h')
-rw-r--r-- | Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h index 6e9ec8c..cef5d7e 100644 --- a/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h +++ b/Auxiliary/Cactus/KrancNumericalTools/GenericFD/src/MathematicaCompat.h @@ -7,10 +7,12 @@ #define Abs(x) (fabs(x)) #define Min(x, y) (fmin((x), (y))) #define Max(x, y) (fmax((x), (y))) +#define IfThen(x,y,z) ((x) ? (y) : (z)) #else #define Abs(x) (abs(x)) #define Min(x, y) (min((x), (y))) #define Max(x, y) (max((x), (y))) +/* IfThen cannot be expressed in Fortran */ #endif #define Exp(x) (exp(x)) |