fix a bug with parameter skipping and make code flow more readable

This commit is contained in:
dymik739 2023-03-21 22:29:04 +02:00
parent a9e3c765c6
commit 5f109a0072
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ public class Main {
} }
else if (Objects.equals(args[p], "--offline")) { else if (Objects.equals(args[p], "--offline")) {
allow_networking = false; allow_networking = false;
p += 2; p += 1;
} }
else { else {
matrix_file_name = args[p++]; matrix_file_name = args[p++];
@ -67,6 +67,7 @@ public class Main {
System.out.println("Original matrix:"); System.out.println("Original matrix:");
Matrix m = new Matrix(); Matrix m = new Matrix();
m.init(raw_m); m.init(raw_m);
m.print();
// transposing // transposing
m.transpose(); m.transpose();

View File

@ -19,7 +19,6 @@ public class Matrix {
} }
public void transpose() { public void transpose() {
print();
if (this.m[0].length != this.m.length) { if (this.m[0].length != this.m.length) {
int new_h = this.m[0].length; int new_h = this.m[0].length;
int new_w = this.m.length; int new_w = this.m.length;