Skip to content

Commit

Permalink
matrixCrash
Browse files Browse the repository at this point in the history
  • Loading branch information
alancutter committed Apr 12, 2017
1 parent a9b7235 commit 0d17d49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/matrix-decomposition.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
}

if (determinant(perspectiveMatrix) === 0) {
return false;
return null;
}

var rhs = [];
Expand Down
9 changes: 9 additions & 0 deletions test/js/matrix-interpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ suite('matrix interpolation', function() {
var evaluatedInterp = interpolatedMatrix(0.5);
compareMatrices(evaluatedInterp, [1, -0.1, 0, 1, 0, 0], 6);

var interpolatedMatrix = webAnimations1.propertyInterpolation(
'transform',
'matrix(0, 0, 0, 0, 0, 0)',
'matrix(1, 0, 0, 1, 0, 0)');
var evaluatedInterp = interpolatedMatrix(0.25);
compareMatrices(evaluatedInterp, [0, 0, 0, 0, 0, 0], 6);
evaluatedInterp = interpolatedMatrix(0.75);
compareMatrices(evaluatedInterp, [1, 0, 0, 1, 0, 0], 6);

interpolatedMatrix = webAnimations1.propertyInterpolation(
'transform',
'matrix(1, 0, 0, 1, 0, 0)',
Expand Down

0 comments on commit 0d17d49

Please sign in to comment.