aboutsummaryrefslogtreecommitdiff
path: root/redist/linmath.h
diff options
context:
space:
mode:
authorultramn <dchapm2@umbc.edu>2017-03-09 17:41:36 -0800
committerultramn <dchapm2@umbc.edu>2017-03-09 17:41:36 -0800
commit031d53bf45d9c8648f8d4c4a8fcad29c456dd932 (patch)
treeacac6d75dc38d0041a5be52c5e3ca457aaded967 /redist/linmath.h
parenta956d29b35aa9c8b7cfd869683afb382da65b3ea (diff)
parenta8dcfa48d3b5831f0a0470c78d71003349c0e758 (diff)
downloadlibsurvive-031d53bf45d9c8648f8d4c4a8fcad29c456dd932.tar.gz
libsurvive-031d53bf45d9c8648f8d4c4a8fcad29c456dd932.tar.bz2
Merge branch 'master' of https://github.com/cnlohr/libsurvive
Diffstat (limited to 'redist/linmath.h')
-rw-r--r--redist/linmath.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/redist/linmath.h b/redist/linmath.h
index caec281..ec20534 100644
--- a/redist/linmath.h
+++ b/redist/linmath.h
@@ -7,8 +7,8 @@
#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 PFTHREE(x) (x)[0], (x)[1], (x)[2]
+#define PFFOUR(x) (x)[0], (x)[1], (x)[2], (x)[3]
#define LINMATHPI ((FLT)3.141592653589)
@@ -76,6 +76,7 @@ FLT quatmagnitude( const FLT * q );
FLT quatinvsqmagnitude( const FLT * q );
void quatnormalize( FLT * qout, const FLT * qin ); //Safe for in to be same as out.
void quattomatrix( FLT * matrix44, const FLT * q );
+void quatfrommatrix( FLT * q, const FLT * matrix44 );
void quatgetconjugate( FLT * qout, const FLT * qin );
void quatgetreciprocal( FLT * qout, const FLT * qin );
void quatsub( FLT * qout, const FLT * a, const FLT * b );