From 3115176643ecc88c3970ad0236b36dac0f3d2f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Fro=C5=82ow?= Date: Tue, 25 Feb 2025 13:56:17 +0100 Subject: [PATCH] [zig] simpler multidimensional arrays (#5262) --- zig.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zig.md b/zig.md index ad56a471..75becf37 100644 --- a/zig.md +++ b/zig.md @@ -153,10 +153,10 @@ try some_integers[i]; // Runtime error 'index out of bounds'. ```zig const mat4x4 = [4][4]f32{ - [_]f32{ 1.0, 0.0, 0.0, 0.0 }, - [_]f32{ 0.0, 1.0, 0.0, 1.0 }, - [_]f32{ 0.0, 0.0, 1.0, 0.0 }, - [_]f32{ 0.0, 0.0, 0.0, 1.0 }, + .{ 1, 0, 0, 0 }, + .{ 0, 1, 0, 1 }, + .{ 0, 0, 1, 0 }, + .{ 0, 0, 0, 1 }, }; // Access the 2D array then the inner array through indexes.