From 1097786babad559c7715f1d31b1bf6c8672fb945 Mon Sep 17 00:00:00 2001 From: Rohit Paul <113459757+RohitPaul12345@users.noreply.github.com> Date: Thu, 17 Aug 2023 19:42:50 +0530 Subject: [PATCH] Update datamask.js --- src/datamask.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/datamask.js b/src/datamask.js index 2f99523a..5e8f6a10 100644 --- a/src/datamask.js +++ b/src/datamask.js @@ -23,7 +23,7 @@ */ -var DataMask = {}; +let DataMask = {}; DataMask.forReference = function(reference) { @@ -38,9 +38,9 @@ function DataMask000() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) { @@ -59,9 +59,9 @@ function DataMask001() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) { @@ -80,9 +80,9 @@ function DataMask010() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) { @@ -101,9 +101,9 @@ function DataMask011() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) { @@ -122,9 +122,9 @@ function DataMask100() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) { @@ -143,9 +143,9 @@ function DataMask101() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) { @@ -156,7 +156,7 @@ function DataMask101() } this.isMasked=function( i, j) { - var temp = i * j; + let temp = i * j; return (temp & 0x01) + (temp % 3) == 0; } } @@ -165,9 +165,9 @@ function DataMask110() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) { @@ -178,7 +178,7 @@ function DataMask110() } this.isMasked=function( i, j) { - var temp = i * j; + let temp = i * j; return (((temp & 0x01) + (temp % 3)) & 0x01) == 0; } } @@ -186,9 +186,9 @@ function DataMask111() { this.unmaskBitMatrix=function(bits, dimension) { - for (var i = 0; i < dimension; i++) + for (let i = 0; i < dimension; i++) { - for (var j = 0; j < dimension; j++) + for (let j = 0; j < dimension; j++) { if (this.isMasked(i, j)) {