Pārlūkot izejas kodu

Fix formatting issues in DecimalPlaceIsNonZero

ApisNecros 1 gadu atpakaļ
vecāks
revīzija
e341f366fa
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      IntComp/Computer.js

+ 3 - 2
IntComp/Computer.js

@@ -111,6 +111,7 @@ module.exports = class Computer {
      * Execute the OUTPUT opcode
      *
      * @param {number} outputPosition The memory address of the value to output
+     * @returns {void}
      */
     Operation_Output(outputPosition) {
         console.log(this.stack.Get(outputPosition));
@@ -142,5 +143,5 @@ module.exports = class Computer {
  * @returns {boolean} Whether the value in that number's place is non-zero
  */
 function DecimalPlaceIsNonZero(input, place) {
-    return !!Math.floor((input % 10**place) / 10**(place - 1));
-}
+    return !!Math.floor((input % (10 ** place)) / (10 ** (place - 1)));
+}