summaryrefslogtreecommitdiffhomepage
path: root/compat/hamilton-tools.cpp
diff options
context:
space:
mode:
authorTom Brazier <tom_github@firstsolo.net>2023-06-05 15:52:26 +0100
committerTom Brazier <tom_github@firstsolo.net>2023-07-23 14:00:51 +0100
commit96f51ea8a769c2f49525e2424ace165ec3c05ef8 (patch)
tree1cf3e0e6d9bd55de34e844883b8bd2fabb67cd70 /compat/hamilton-tools.cpp
parent8af36d5f6590b4f49acc288f9113cca4df3c99a0 (diff)
Added new vector and quaternion functions and inlined many of them
Diffstat (limited to 'compat/hamilton-tools.cpp')
-rw-r--r--compat/hamilton-tools.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/compat/hamilton-tools.cpp b/compat/hamilton-tools.cpp
index dfbb4630..eb0ef984 100644
--- a/compat/hamilton-tools.cpp
+++ b/compat/hamilton-tools.cpp
@@ -1,27 +1,6 @@
#include "hamilton-tools.h"
#include <cmath>
-double VectorLength(const tVector& v)
-{
- return(sqrt(v.v[0]*v.v[0] + v.v[1]*v.v[1] + v.v[2]*v.v[2]));
-}
-
-double sqr(const double v) { return(v*v); }
-
-double VectorDistance(const double v1[], const tVector& v2)
-{
- return(sqrt(sqr(v2.v[0]-v1[0])+sqr(v2.v[1]-v1[1])+sqr(v2.v[2]-v1[2])));
-}
-
-tVector Lerp(const tVector& s, const double d[], const double alpha)
-{
- tVector V;
- V.v[0] = s.v[0] + (d[0] - s.v[0]) * alpha;
- V.v[1] = s.v[1] + (d[1] - s.v[1]) * alpha;
- V.v[2] = s.v[2] + (d[2] - s.v[2]) * alpha;
- return(V);
-}
-
tQuat QuatFromAngleAxe(const double angle, const tVector& axe)
{
double a = TO_RAD * 0.5 * angle;
@@ -45,11 +24,6 @@ tQuat QuatMultiply(const tQuat& qL, const tQuat& qR)
return(Q);
}
-double AngleBetween(const tQuat& S, const tQuat& D)
-{
- return( TO_DEG * 2*acos(fabs(S.x*D.x + S.y*D.y + S.z*D.z + S.w*D.w)) );
-}
-
tQuat QuatFromYPR(const double YPR[])
{
tQuat Q, Qp, Qy;