On 4/18/18 3:15 AM, Simen Kjærås wrote:
On Wednesday, 18 April 2018 at 06:54:29 UTC, Chris Katko wrote:
I need to rotate an array by 90 degrees, or have writefln figure that
out.
I need, say:
0 4 5 6
0 0 0 0
0 0 0 0
0 0 0 0
But it's outputting:
0 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
int [4][4] da
On Thursday, 19 April 2018 at 10:10:41 UTC, Chris Katko wrote:
That makes sense why transpose wouldn't work for my arrays!
So you're saying if I used [][] (dynamic array) that's a range
of ranges, and it would work?
Yup. Static arrays can't be ranges, since popFront must mutate
the length, a
On Wednesday, 18 April 2018 at 07:15:47 UTC, Simen Kjærås wrote:
On Wednesday, 18 April 2018 at 06:54:29 UTC, Chris Katko wrote:
I need to rotate an array by 90 degrees, or have writefln
figure that out.
I need, say:
0 4 5 6
0 0 0 0
0 0 0 0
0 0 0 0
But it's outputting:
0 0 0 0
4 0 0 0
5 0 0
On Wednesday, 18 April 2018 at 06:54:29 UTC, Chris Katko wrote:
I need to rotate an array by 90 degrees, or have writefln
figure that out.
I need, say:
0 4 5 6
0 0 0 0
0 0 0 0
0 0 0 0
But it's outputting:
0 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
int [4][4] data;
file.writeln(format("%(%-(%d %)\n%)",
On Wednesday, 18 April 2018 at 06:54:29 UTC, Chris Katko wrote:
I need to rotate an array by 90 degrees, or have writefln
figure that out.
I need, say:
0 4 5 6
0 0 0 0
0 0 0 0
0 0 0 0
But it's outputting:
0 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
int [4][4] data;
file.writeln(format("%(%-(%d %)\n%)",
I need to rotate an array by 90 degrees, or have writefln figure
that out.
I need, say:
0 4 5 6
0 0 0 0
0 0 0 0
0 0 0 0
But it's outputting:
0 0 0 0
4 0 0 0
5 0 0 0
6 0 0 0
int [4][4] data;
file.writeln(format("%(%-(%d %)\n%)", data));