const std = @import("std"); pub const Fd = struct { fd: std.posix.fd_t }; pub const Fixed = struct { n: u24, f: u8, pub fn from_f64(float: f64) @This() { const n: u24 = @intFromFloat(float); const f: u8 = @intFromFloat(std.math.maxInt(u8) * (float - @as(f64, @floatFromInt(n)))); return .{ .n = n, .f = f, }; } };