From 4d22f1f5441027b08156b1f64490eeb9f926c2d5 Mon Sep 17 00:00:00 2001 From: Dudejoe870 Date: Sun, 17 Nov 2024 10:42:59 -0600 Subject: [PATCH] Fix typo in Quaternion dot product --- core/math/linalg/general.odin | 6 +++--- 1 file 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}