summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-01 01:17:39 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-01 01:17:39 +0200
commit4bd22e4d813172eee232d480dc8a00e85f6e4fcb (patch)
tree1b62190ab11a8fd01688a2c79137899a4bb8cb8f /compat
parent57712e58d97a048d3d6d0b613fab4a99ab26e583 (diff)
simple-mat: broke cross product formula
Diffstat (limited to 'compat')
-rw-r--r--compat/simple-mat.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/simple-mat.hpp b/compat/simple-mat.hpp
index 46d9e382..9490473a 100644
--- a/compat/simple-mat.hpp
+++ b/compat/simple-mat.hpp
@@ -134,14 +134,14 @@ public:
template<int R, int S, int P = h_, int Q = w_>
typename std::enable_if<is_dim3<P, Q, R, S>::value, Mat<num, is_dim3<P, Q, R, S>::P, is_dim3<P, Q, R, S>::Q>>::type
- cross(const Mat<num, R, S>& p2) const
+ cross(const Mat<num, R, S>& b) const
{
static_assert(P == h_ && Q == w_, "");
- decltype(*this)& p1 = *this;
+ decltype(*this)& a = *this;
- return Mat<num, R, S>(p1.y() * p2.z() - p1.y() * p2.z(),
- p1.x() * p2.z() - p1.x() * p2.z(),
- p1.x() * p2.y() - p1.y() * p2.x());
+ return Mat<num, R, S>(a.y()*b.z() - a.z()*b.y(),
+ a.z()*b.x() - a.x()*b.z(),
+ a.x()*b.y() - a.y()*b.x());
}
Mat<num, h_, w_> operator+(const Mat<num, h_, w_>& other) const