tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
fused_quaternion-example.h
Go to the documentation of this file.
1// #ifndef FUSEDQUATERNION_H
2// #define FUSEDQUATERNION_H
3
4// #include "fused/fused_vector.h"
5// // Derived class: FusedQuaternion
6// template <typename T>
7// class FusedQuaternion : public FusedVector<T, 4>
8// {
9// public:
10// using Base = FusedVector<T, 4>;
11// using Base::Base; // Inherit constructors from FusedVector
12// using Base::operator=;
13
14// double dot(const FusedQuaternion &q) const; // preferred
15// // OR
16// double operator|(const FusedQuaternion &q) const; // less common, but concise
17
18// FusedQuaternion conjugate() const;
19// double norm() const;
20// FusedQuaternion inverse() const;
21
22// // Accessors for quaternion components
23// T &w() { return (*this)(0); }
24// T &x() { return (*this)(1); }
25// T &y() { return (*this)(2); }
26// T &z() { return (*this)(3); }
27
28// const T &w() const { return (*this)(0); }
29// const T &x() const { return (*this)(1); }
30// const T &y() const { return (*this)(2); }
31// const T &z() const { return (*this)(3); }
32// };
33
34// #endif // FUSEDQUATERNION_H