aboutsummaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorDudejoe870 <dudejoe870@gmail.com>2024-11-17 10:42:59 -0600
committerDudejoe870 <dudejoe870@gmail.com>2024-11-17 10:42:59 -0600
commit4d22f1f5441027b08156b1f64490eeb9f926c2d5 (patch)
treeb11788c0243239f80053491aa3bd7322e2bdb1e4 /core/math
parent20f4f378b202d38bc93917d89ade31b35f9e4970 (diff)
Fix typo in Quaternion dot product
Diffstat (limited to 'core/math')
-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}