initial commit
Zig Project Action / Lint, Spell-check and test zig project (push) Has been cancelled

based on sources of https://github.com/noahbald/noe which are MIT-licensed
This commit is contained in:
2026-06-06 20:48:35 +02:00
parent d2836931a7
commit ae666cb436
12 changed files with 2116 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
pub const Ordering = enum(u2) {
less = 0,
equal = 1,
greater = 2,
pub fn cmp(a: anytype, b: anytype) Ordering {
if (a < b) return .less else if (a == b) return .equal else return .greater;
}
pub fn gte(self: Ordering) bool {
return @intFromEnum(self) > 1;
}
pub fn lte(self: Ordering) bool {
return @intFromEnum(self) < 1;
}
pub fn is(self: Ordering, other: Ordering) bool {
return @intFromEnum(self) == @intFromEnum(other);
}
};