git.s-ol.nu forks/glm-zig / de2c386
update to follow newer zig versions spx01 3 years ago
1 changed file(s) with 2 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
22 const testing = std.testing;
33
44 pub fn Matrix(comptime N: usize) type {
5 return packed struct {
5 return struct {
66 const Self = @This();
77 pub const Scalar = f32;
88
3939 while (i < N) : (i += 1) {
4040 comptime var j = 0;
4141 while (j < N) : (j += 1) {
42 result.values[i][j] = brk: {
43 if (i == j) {
44 break :brk 1;
45 } else {
46 break :brk 0;
47 }
48 };
42 result.values[i][j] = if (i == j) 1 else 0;
4943 }
5044 }
5145