Skip to content

Commit

Permalink
Remove affinity check (unreliable)
Browse files Browse the repository at this point in the history
  • Loading branch information
gecko0307 committed May 9, 2020
1 parent dcdc0d7 commit a8878a7
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 a8878a7

Please sign in to comment.