math: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
e1ce5c5662
commit
c03673ff05
2 changed files with 11 additions and 22 deletions
|
|
@ -371,7 +371,6 @@ pub fn Mat(
|
|||
return vec.Vec(ColVec.n, ColVec.T){ .v = result };
|
||||
}
|
||||
|
||||
|
||||
// TODO: the below code was correct in our old implementation, it just needs to be updated
|
||||
// to work with this new Mat approach, swapping f32 for the generic T float type, moving 3x3
|
||||
// and 4x4 specific functions into the mixin above, writing new tests, etc.
|
||||
|
|
@ -687,6 +686,3 @@ test "Mat4x4_mulVec_vec4" {
|
|||
const expected = math.vec4(4, 47, 5, 68);
|
||||
try testing.expect(math.Vec4, expected).eql(m);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -80,11 +80,8 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type {
|
|||
result[i] += vector.v[j] * matrix.v[i].v[j];
|
||||
}
|
||||
}
|
||||
return .{
|
||||
.v = result
|
||||
};
|
||||
return .{ .v = result };
|
||||
}
|
||||
|
||||
},
|
||||
inline 4 => struct {
|
||||
pub inline fn init(xs: Scalar, ys: Scalar, zs: Scalar, ws: Scalar) VecN {
|
||||
|
|
@ -111,9 +108,7 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type {
|
|||
result[i] += vector.v[j] * matrix.v[i].v[j];
|
||||
}
|
||||
}
|
||||
return .{
|
||||
.v = result
|
||||
};
|
||||
return .{ .v = result };
|
||||
}
|
||||
},
|
||||
else => @compileError("Expected Vec2, Vec3, Vec4, found '" ++ @typeName(VecN) ++ "'"),
|
||||
|
|
@ -346,8 +341,6 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type {
|
|||
|
||||
return min_scalar;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue