Skip to content

Commit 3115176

Browse files
authored
[zig] simpler multidimensional arrays (#5262)
1 parent 42ff954 commit 3115176

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

zig.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ try some_integers[i]; // Runtime error 'index out of bounds'.
153153

154154
```zig
155155
const mat4x4 = [4][4]f32{
156-
[_]f32{ 1.0, 0.0, 0.0, 0.0 },
157-
[_]f32{ 0.0, 1.0, 0.0, 1.0 },
158-
[_]f32{ 0.0, 0.0, 1.0, 0.0 },
159-
[_]f32{ 0.0, 0.0, 0.0, 1.0 },
156+
.{ 1, 0, 0, 0 },
157+
.{ 0, 1, 0, 1 },
158+
.{ 0, 0, 1, 0 },
159+
.{ 0, 0, 0, 1 },
160160
};
161161
162162
// Access the 2D array then the inner array through indexes.

0 commit comments

Comments
 (0)