diff --git a/Math/Quat_Multiplication.cpp b/Math/Quat_Multiplication.cpp deleted file mode 100644 index 2aae442..0000000 --- a/Math/Quat_Multiplication.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include - -template -struct Quaternion { - T w, x, y, z; -}; - -template -Quaternion quat_multiply(Quaternion A, Quaternion B) { - return { - B.w * A.w - B.x * A.x - B.y * A.y - B.z * A.z, - B.w * A.x + B.x * A.w - B.y * A.z + B.z * A.y, - B.w * A.y + B.x * A.z + B.y * A.w - B.z * A.x, - B.w * A.z - B.x * A.y + B.y * A.x + B.z * A.w - }; -} - -int main() { - Quaternion q1 = {1.0f, 0.0f, 0.0f, 0.0f}; - Quaternion q2 = {0.5f, 0.5f, 0.5f, 0.5f}; - - Quaternion result = quat_multiply(q1, q2); // Returns the result! - - std::cout << "Result: (" - << result.w << ", " - << result.x << ", " - << result.y << ", " - << result.z << ")" << std::endl; - - return 0; -} \ No newline at end of file