diff --git a/src/experimental/_impl/_m_determinant_impl.scad b/src/experimental/_impl/_m_determinant_impl.scad index f838921b..432fb1b3 100644 --- a/src/experimental/_impl/_m_determinant_impl.scad +++ b/src/experimental/_impl/_m_determinant_impl.scad @@ -1,7 +1,5 @@ use ; - -function _m_determinant_sum(lt, leng, i = 0) = - i == leng ? 0 : (lt[i] + _m_determinant_sum(lt, leng, i + 1)); +use ; function _m_determinant_sub(matrix, leng, fc) = let( @@ -17,4 +15,4 @@ function _m_determinant(matrix) = let(leng = len(matrix)) leng == 2 ? matrix[0][0] * matrix[1][1] - matrix[1][0] * matrix[0][1] : let(indices = [for(i = [0:leng - 1]) i]) - _m_determinant_sum([for(fc = indices) _m_determinant_sub(matrix, leng, fc)], leng); \ No newline at end of file + sum([for(fc = indices) _m_determinant_sub(matrix, leng, fc)]); \ No newline at end of file