Skip to content

Commit fc29286

Browse files
committed
Swap x and y in Coordinates.toString(), too
1 parent a5da9d5 commit fc29286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/de/ronny_h/aoc/extensions/grids/Coordinates.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ data class Coordinates(val x: Int, val y: Int) : Comparable<Coordinates> {
3333
*/
3434
infix fun taxiDistanceTo(other: Coordinates): Int = abs(other.x - x) + abs(other.y - y)
3535

36-
override fun toString() = "($y,$x)"
36+
override fun toString() = "($x,$y)"
3737

3838
/**
3939
* Orders [Coordinates] in reading order: top-to-bottom, then left-to-right.

0 commit comments

Comments
 (0)