fromArray

This commit is contained in:
2026-09-02 15:39:27 -05:00
parent 7d7e19b0fc
commit 598deefd86

View File

@@ -39,6 +39,10 @@ pub fn Matrix(rows: comptime_int, cols: comptime_int, T: type) type {
fn array(self: Self) [self.rows]T {
return @bitCast(self.mat);
}
fn fromArray(a: [rows]T) Self {
return .{ .mat = @bitCast(a) };
}
};
pub const get = if (cols == 1) vector.get else @compileError("Not a vector");