aboutsummaryrefslogtreecommitdiff
path: root/redist/linmath.h
diff options
context:
space:
mode:
authorCNLohr <lohr85@gmail.com>2017-03-14 20:45:17 -0400
committerCNLohr <lohr85@gmail.com>2017-03-14 20:45:17 -0400
commit3bb47bc1f5fc048e68168db5063fdcd2177a10e7 (patch)
tree04b7f1817493ea025cb0978465de53c85f3dc1c3 /redist/linmath.h
parent0a2550249f9523dca974a79b51b5a7358b5fb943 (diff)
downloadlibsurvive-3bb47bc1f5fc048e68168db5063fdcd2177a10e7.tar.gz
libsurvive-3bb47bc1f5fc048e68168db5063fdcd2177a10e7.tar.bz2
Update with the start of things to make TCC go in Windows.
Diffstat (limited to 'redist/linmath.h')
-rw-r--r--redist/linmath.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/redist/linmath.h b/redist/linmath.h
index 66a38ed..4e0cb77 100644
--- a/redist/linmath.h
+++ b/redist/linmath.h
@@ -25,7 +25,7 @@
#define FLT_ACOS acos
#define FLT_ASIN asin
#define FLT_ATAN2 atan2
-#define FLT_FABS fabs
+#define FLT_FABS__ fabs
#else
@@ -37,10 +37,15 @@
#define FLT_ACOS acosf
#define FLT_ASIN asinf
#define FLT_ATAN2 atan2f
-#define FLT_FABS fabsf
+#define FLT_FABS__ fabsf
#endif
+#ifdef TCC
+#define FLT_FABS(x) (((x)<0)?(-(x)):(x))
+#else
+#define FLT_FABS FLT_FABS__
+#endif
//NOTE: Inputs may never be output with cross product.