From 7cbaaf84f74992c8924dfe5d14dff385504a5b43 Mon Sep 17 00:00:00 2001 From: karl Date: Tue, 12 Jan 2021 18:38:16 +0100 Subject: [PATCH] Fix typo in cross product --- Util/geometry.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Util/geometry.h b/Util/geometry.h index 980fb30..506298f 100644 --- a/Util/geometry.h +++ b/Util/geometry.h @@ -1,3 +1,5 @@ +#pragma once + #include // Forward declarations @@ -24,7 +26,7 @@ struct Vector { } Vector cross(const Vector &other) { - return Vector(c[1] * other[2] - c[2] - other[1], c[2] * other[0] - c[0] * other[2], + return Vector(c[1] * other[2] - c[2] * other[1], c[2] * other[0] - c[0] * other[2], c[0] * other[1] - c[1] * other[0]); }