generated from karl/cpp-template
Fix typo in cross product calculation
This commit is contained in:
parent
bf96bbf26f
commit
7b8506d102
@ -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]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user