aboutsummaryrefslogtreecommitdiff
path: root/redist/linmath.h
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-12-15 22:35:34 -0500
committercnlohr <lohr85@gmail.com>2016-12-15 22:35:34 -0500
commitbe571a486992bf01ddf72b536b7c3bc47a87cc78 (patch)
treed17f8dcf9c502e11f72ba626acbb218daa463cc5 /redist/linmath.h
parent4dbacd89da4fe29ec6ffcf0bd6e1fc4d942b4e27 (diff)
downloadlibsurvive-be571a486992bf01ddf72b536b7c3bc47a87cc78.tar.gz
libsurvive-be571a486992bf01ddf72b536b7c3bc47a87cc78.tar.bz2
Fix library add two more utility functions
Diffstat (limited to 'redist/linmath.h')
-rw-r--r--redist/linmath.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/redist/linmath.h b/redist/linmath.h
index 9b21347..5cc7b7d 100644
--- a/redist/linmath.h
+++ b/redist/linmath.h
@@ -6,6 +6,12 @@
//Yes, I know it's kind of arbitrary.
#define DEFAULT_EPSILON 0.001
+//For printf
+#define PFTHREE(x) x[0], x[1], x[2]
+#define PFFOUR(x) x[0], x[1], x[2], x[3]
+
+#define LINMATHPI 3.141592653589
+
//If you want, you can define FLT to be double for double precision.
#ifndef FLT
#define FLT float
@@ -30,8 +36,9 @@ int compare3d( const FLT * a, const FLT * b, FLT epsilon );
void copy3d( FLT * out, const FLT * in );
+FLT magnitude3d( FLT * a );
-
+FLT anglebetween3d( FLT * a, FLT * b );
//Quaternion things...