pub fn order(a: anytype, b: anytype) Order ab1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615pub fn order(a: anytype, b: anytype) Order {
if (a == b) {
return .eq;
} else if (a < b) {
return .lt;
} else if (a > b) {
return .gt;
} else {
unreachable;
}
}
Given two numbers, this function returns the order they are with respect to each other.