Fix typo in cross product calculation

This commit is contained in:
karl 2021-01-12 18:44:21 +01:00
parent bf96bbf26f
commit 7b8506d102

View File

@ -1,3 +1,5 @@
#pragma once
#include <vector> #include <vector>
// Forward declarations // Forward declarations
@ -24,7 +26,7 @@ struct Vector {
} }
Vector cross(const Vector &other) { 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]); c[0] * other[1] - c[1] * other[0]);
} }