diff --git a/lib/matrix.rb b/lib/matrix.rb index ee26cb94d0..b98fc85839 100644 --- a/lib/matrix.rb +++ b/lib/matrix.rb @@ -747,12 +747,12 @@ class Matrix when 2 + m[0][0] * m[1][1] - m[0][1] * m[1][0] when 3 - m0 = m[0]; m1 = m[1]; m2 = m[2] + m0, m1, m2 = m + m0[0] * m1[1] * m2[2] - m0[0] * m1[2] * m2[1] \ - m0[1] * m1[0] * m2[2] + m0[1] * m1[2] * m2[0] \ + m0[2] * m1[0] * m2[1] - m0[2] * m1[1] * m2[0] when 4 - m0 = m[0]; m1 = m[1]; m2 = m[2]; m3 = m[3] + m0, m1, m2, m3 = m + m0[0] * m1[1] * m2[2] * m3[3] - m0[0] * m1[1] * m2[3] * m3[2] \ - m0[0] * m1[2] * m2[1] * m3[3] + m0[0] * m1[2] * m2[3] * m3[1] \ + m0[0] * m1[3] * m2[1] * m3[2] - m0[0] * m1[3] * m2[2] * m3[1] \