Skip to content

Determinant fix #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Generalize determinant test.
Changed the determinant test to check that the condition hold for any
random matrix (and not jus the sample matrix used initially).
  • Loading branch information
wcmatthysen committed Apr 10, 2019
commit 9a598403d0388595e0d1994896b749561d073124
10 changes: 5 additions & 5 deletions test/gov/nasa/worldwind/geom/MatrixTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ public void testInverseOfNearSingular()
@Test
public void testDeterminantEqualToDeterminantOfTranspose()
{
// Create sample matrix.
// Create random matrix.
Matrix matrix = new Matrix(
1, 0, 0, 1,
1, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1);
random.nextDouble(), random.nextDouble(), random.nextDouble(), random.nextDouble(),
random.nextDouble(), random.nextDouble(), random.nextDouble(), random.nextDouble(),
random.nextDouble(), random.nextDouble(), random.nextDouble(), random.nextDouble(),
random.nextDouble(), random.nextDouble(), random.nextDouble(), random.nextDouble());

// Calculate the determinant.
double determinant = matrix.getDeterminant();
Expand Down