On Tuesday, 9 October 2018 at 10:52:47 UTC, Chris Katko wrote:
I have a 2-D array:
int[5][5] data =
[
[1, 0, 1, 0, 0],
[1, 0, 1, 0, 0],
[1, 0, 1, 1, 1],
[1, 0, 0, 1, 0],
[1, 1, 1, 1, 0]
];
1 - Is
On Tuesday, 9 October 2018 at 10:52:47 UTC, Chris Katko wrote:
I have a 2-D array:
1 - Is there a way to foreach vertically through that? (that
is, rotated 90 degrees from the usual iteration.)
2 - Is there a way to send that "vertical slice" to a function?
Not built-in in the language,
On Tuesday, 9 October 2018 at 10:52:47 UTC, Chris Katko wrote:
I have a 2-D array:
int[5][5] data =
[
[1, 0, 1, 0, 0],
[1, 0, 1, 0, 0],
[1, 0, 1, 1, 1],
[1, 0, 0, 1, 0],
[1, 1, 1, 1, 0]
];
1 - Is
I have a 2-D array:
int[5][5] data =
[
[1, 0, 1, 0, 0],
[1, 0, 1, 0, 0],
[1, 0, 1, 1, 1],
[1, 0, 0, 1, 0],
[1, 1, 1, 1, 0]
];
1 - Is there a way to foreach vertically through that? (that is,