From be571a486992bf01ddf72b536b7c3bc47a87cc78 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Thu, 15 Dec 2016 22:35:34 -0500 Subject: Fix library add two more utility functions --- redist/linmath.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'redist/linmath.h') 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... -- cgit v1.2.3