fix transpose

This commit is contained in:
alex-s168
2024-06-12 23:26:20 +02:00
parent 877a6f51e3
commit eb073ac469
2 changed files with 2 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ plugins {
} }
group = "me.alex_s168" group = "me.alex_s168"
version = "0.16" version = "0.17"
repositories { repositories {
mavenCentral() mavenCentral()

View File

@@ -58,7 +58,7 @@ class Matrix<T>(
} }
fun transposeCopy(): Matrix<T> = fun transposeCopy(): Matrix<T> =
Matrix(width, height) { x, y -> this[y, x] } Matrix(height, width) { x, y -> this[y, x] }
fun perfectSquareCopy(): Matrix<T> = fun perfectSquareCopy(): Matrix<T> =
min(width, height).let { wh -> min(width, height).let { wh ->