Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gecko0307/dlib
Browse files Browse the repository at this point in the history
  • Loading branch information
gecko0307 committed May 13, 2020
2 parents 92746b9 + a8878a7 commit 50607a4
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions dlib/math/matrix.d
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,12 @@ struct Matrix(T, size_t N)
Vector!(T,3) opBinaryRight(string op) (Vector!(T,3) v) if (op == "*")
do
{
if (isAffine)
{
return Vector!(T,3)
(
(v.x * a11) + (v.y * a12) + (v.z * a13) + a14,
(v.x * a21) + (v.y * a22) + (v.z * a23) + a24,
(v.x * a31) + (v.y * a32) + (v.z * a33) + a34
);
}
else
assert(0, "Cannot multiply Vector!(T,3) by non-affine Matrix!(T,4)");
return Vector!(T,3)
(
(v.x * a11) + (v.y * a12) + (v.z * a13) + a14,
(v.x * a21) + (v.y * a22) + (v.z * a23) + a24,
(v.x * a31) + (v.y * a32) + (v.z * a33) + a34
);
}
}

Expand Down

0 comments on commit 50607a4

Please sign in to comment.