This commit is contained in:
Jan Kowalczyk
2025-09-10 19:41:00 +02:00
parent ef0c36eed5
commit cf15d5501e
17 changed files with 1198 additions and 720 deletions

20
tools/print_mat.py Normal file
View File

@@ -0,0 +1,20 @@
rows = 5
cols = 4
mat = [range(0 + (cols * i), cols + (cols * i), 1) for i in range(rows)]
def print_mat(mat):
for s in mat:
print(*s)
def rotate_mat(mat):
mat = [[mat[row][col] for row in range(rows - 1, -1, -1)] for col in range(cols)]
return mat
print_mat(mat)
mat = rotate_mat(mat)
print("rotated:")
print_mat(mat)