Vector3f cross product directly return result (#109)

This commit is contained in:
Daniel Agar
2019-11-28 04:36:13 -05:00
committed by Julian Kent
parent de85dcff97
commit dba84236cb
+1 -5
View File
@@ -58,11 +58,7 @@ public:
Vector3 cross(const Matrix31 & b) const { Vector3 cross(const Matrix31 & b) const {
const Vector3 &a(*this); const Vector3 &a(*this);
Vector3 c; return {a(1)*b(2,0) - a(2)*b(1,0), -a(0)*b(2,0) + a(2)*b(0,0), a(0)*b(1,0) - a(1)*b(0,0)};
c(0) = a(1)*b(2,0) - a(2)*b(1,0);
c(1) = -a(0)*b(2,0) + a(2)*b(0,0);
c(2) = a(0)*b(1,0) - a(1)*b(0,0);
return c;
} }
/** /**