diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-15 15:49:45 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-15 15:49:45 -0400 |
commit | cdc0335d77e7b07349f43a63442cdad09bcc15f9 (patch) | |
tree | 55f8082dde942edf91cb8556d9ec585a21dbcff0 /src/math | |
parent | 1309dd2cc1d464ab24283119eda2aa487338b9be (diff) |
define copysign() macro for C < 99
Diffstat (limited to 'src/math')
-rw-r--r-- | src/math/_tgmath.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/math/_tgmath.h b/src/math/_tgmath.h index a84614a9..8cd7871b 100644 --- a/src/math/_tgmath.h +++ b/src/math/_tgmath.h @@ -64,4 +64,8 @@ #include "signbit.c" #endif +#ifndef copysign +#define copysign(_x, _y) (_x < 0 ? -_y : _y) +#endif + #endif |