aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaytan <laytanlaats@hotmail.com>2024-11-17 18:55:15 +0100
committerGitHub <noreply@github.com>2024-11-17 18:55:15 +0100
commitb3b276c47388a8a86d003fcda414280ac9687147 (patch)
treeb11788c0243239f80053491aa3bd7322e2bdb1e4
parent20f4f378b202d38bc93917d89ade31b35f9e4970 (diff)
parent4d22f1f5441027b08156b1f64490eeb9f926c2d5 (diff)
Merge pull request #4493 from Dudejoe870/quaternion-dot-fix
Fix typo in the Quaternion dot product implementation
-rw-r--r--core/math/linalg/general.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/math/linalg/general.odin b/core/math/linalg/general.odin
index 7587ad63f..f82d75bff 100644
--- a/core/math/linalg/general.odin
+++ b/core/math/linalg/general.odin
@@ -53,15 +53,15 @@ vector_dot :: proc "contextless" (a, b: $T/[$N]$E) -> (c: E) where IS_NUMERIC(E)
}
@(require_results)
quaternion64_dot :: proc "contextless" (a, b: $T/quaternion64) -> (c: f16) {
- return a.w*a.w + a.x*b.x + a.y*b.y + a.z*b.z
+ return a.w*b.w + a.x*b.x + a.y*b.y + a.z*b.z
}
@(require_results)
quaternion128_dot :: proc "contextless" (a, b: $T/quaternion128) -> (c: f32) {
- return a.w*a.w + a.x*b.x + a.y*b.y + a.z*b.z
+ return a.w*b.w + a.x*b.x + a.y*b.y + a.z*b.z
}
@(require_results)
quaternion256_dot :: proc "contextless" (a, b: $T/quaternion256) -> (c: f64) {
- return a.w*a.w + a.x*b.x + a.y*b.y + a.z*b.z
+ return a.w*b.w + a.x*b.x + a.y*b.y + a.z*b.z
}
dot :: proc{scalar_dot, vector_dot, quaternion64_dot, quaternion128_dot, quaternion256_dot}