| author | |
| committer | |
| log | 4b3e1e5bae70df6595051c6d6199de6caa2b6585 |
| tree | 096ffd1af889c5b2ad4591112c092e370be11ab3 |
| parent | 028cd45201b701d558b8527b41366371a06b7a3d |
1 files changed, 9 insertions(+), 0 deletions(-)
_x.zig+9| ... | ... | @@ -24,5 +24,14 @@ pub fn mixin( |
| 24 | 24 | x.a = @intFromFloat(in[3]); |
| 25 | 25 | return x; |
| 26 | 26 | } |
| 27 | ||
| 28 | pub fn to_array(x: T, comptime I: type) [4]I { | |
| 29 | return .{ | |
| 30 | @field(x, @tagName(f1)), | |
| 31 | @field(x, @tagName(f2)), | |
| 32 | @field(x, @tagName(f3)), | |
| 33 | x.a, | |
| 34 | }; | |
| 35 | } | |
| 27 | 36 | }; |
| 28 | 37 | } |