debian/external_deps/fetk/punc/src/vf2c/d_sign.c
raw| 1 | #include "f2c.h" |
| 2 | #ifdef __cplusplus |
| 3 | extern "C" { |
| 4 | #endif |
| 5 | |
| 6 | #ifdef KR_headers |
| 7 | double d_sign(a,b) doublereal *a, *b; |
| 8 | #else |
| 9 | double d_sign(doublereal *a, doublereal *b) |
| 10 | #endif |
| 11 | { |
| 12 | double x; |
| 13 | x = (*a >= 0 ? *a : - *a); |
| 14 | return( *b >= 0 ? x : -x); |
| 15 | } |
| 16 | #ifdef __cplusplus |
| 17 | } |
| 18 | #endif |