四元数(クォータニオン)の計算やらなんやらができます.主に演算子オーバーロードの練習で作りました.温かい目で見てやってください.
Dependencies: Vector3
Dependents: Hybrid_main_FirstEdtion MadgwickFilter MadgwickFilter
Fork of Quaternion by
Diff: Quaternion.hpp
- Revision:
- 3:19af2a12e73a
- Parent:
- 2:7c23225b23dc
- Child:
- 4:a914c6c3b74d
--- a/Quaternion.hpp Sat Jan 28 21:14:26 2017 +0000 +++ b/Quaternion.hpp Sat Jan 28 21:16:51 2017 +0000 @@ -121,9 +121,7 @@ }; }; -/** - @bref クォータニオンの掛け算をします.この際,順序が重要です. -*/ +/** クォータニオンの掛け算をします.この際,順序が重要です.*/ Quaternion operator*(Quaternion l, Quaternion r){ static Quaternion Q; Q.w = l.w*r.w - l.x*r.x - l.y*r.y - l.z*r.z; @@ -138,7 +136,7 @@ return Q; }; -/** @bref クォータニオンをスカラー倍します..*/ +/** クォータニオンをスカラー倍します..*/ Quaternion operator*(double s, Quaternion q){ static Quaternion Q; Q.w = q.w * s; @@ -148,7 +146,7 @@ return Q; }; -/** @bref クォータニオンをスカラー倍します..*/ +/** クォータニオンをスカラー倍します..*/ Quaternion operator*(Quaternion q, double s){ static Quaternion Q; Q.w = q.w * s; @@ -158,7 +156,7 @@ return Q; }; -/** @bref クォータニオンの足し算をします.*/ +/** クォータニオンの足し算をします.*/ Quaternion operator+(Quaternion l, Quaternion r){ static Quaternion Q; Q.w = l.w + r.w; @@ -168,7 +166,7 @@ return Q; } -/** @bref クォータニオンの引き算をします.*/ +/** クォータニオンの引き算をします.*/ Quaternion operator-(Quaternion l, Quaternion r){ static Quaternion Q; Q.w = l.w - r.w;