From 5e1f41b48a346afa10a561eec0a5aff38aa240d6 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Fri, 15 Nov 2024 05:27:22 +0900 Subject: [PATCH] Update app.js --- app.js | 5 ++++- app/assets/js/numbers-0.7.0.wsh.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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++; }