macros.h, cleanup SGN() macro
This commit is contained in:
parent
034188cb43
commit
9c2733db48
|
|
@ -34,7 +34,7 @@
|
|||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define ABS(a) ((a) < 0.0 ? -(a) : (a))
|
||||
#define SGN(a) ((a) < 0.0 ? -(1.0) : (1.0))
|
||||
#define SGN(a) copysign(1.0, (a))
|
||||
#define SWAP(type, a, b) \
|
||||
do { \
|
||||
type SWAP_macro_local = a; \
|
||||
|
|
|
|||
Loading…
Reference in New Issue