const std = @import("std"); pub const max_dim: u16 = switch (@import("builtin").os.tag) { .windows => @intCast(std.math.maxInt(i16)), else => std.math.maxInt(u16), }; pub fn satAdd(a: u16, b: u16) u16 { return @min(a +| b, max_dim); }