From 0bd8690ee13293b1db7c89e12f4c8b9740adb5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20D=2E=20Sch=C3=BCller?= Date: Sat, 23 Sep 2023 05:20:07 +0200 Subject: [PATCH] math: Fix Vec cross method calculation arguments --- src/math/vec.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/math/vec.zig b/src/math/vec.zig index a664fce4..e6998559 100644 --- a/src/math/vec.zig +++ b/src/math/vec.zig @@ -57,9 +57,9 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type { /// and required inputs are Vec3. pub inline fn cross(a: *const VecN, b: *const VecN) VecN { // https://gamemath.com/book/vectors.html#cross_product - const s1 = a.yzx().mul(b.zxy()); - const s2 = a.zxy().mul(b.yzx()); - return s1.sub(s2); + const s1 = a.yzx().mul(&b.zxy()); + const s2 = a.zxy().mul(&b.yzx()); + return s1.sub(&s2); } }, inline 4 => struct {