diff --git a/app.js b/app.js index c3367a1..c8cca45 100644 --- a/app.js +++ b/app.js @@ -82,7 +82,10 @@ var console = { } } - var message = type + ": " + messages.join(' '); + var message = messages.join(' '); + if (typeof type !== "undefined") { + message = type + ": " + message; + } this._echoDefault(message); this._messages.push(message); diff --git a/app/assets/js/numbers-0.7.0.wsh.js b/app/assets/js/numbers-0.7.0.wsh.js index 0725cf1..fb4a1d6 100644 --- a/app/assets/js/numbers-0.7.0.wsh.js +++ b/app/assets/js/numbers-0.7.0.wsh.js @@ -1471,8 +1471,8 @@ matrix.determinant = function (m) { while (numberOfAddedRows < numRow - 1) { newArray.push(m[numberOfAddedRows + 1].slice(0, indexColumn).concat(m[numberOfAddedRows + 1].slice(indexColumn + 1))); numberOfAddedRows++; - } - + } + result += Math.pow(-1, indexColumn) * m[0][indexColumn] * matrix.determinant(newArray); indexColumn++; }