Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

XcmpXi2

cmp.XcmpXi2
inline fn XcmpXi2(comptime T: type, a: T, b: T) i32

File

Code

inline fn XcmpXi2(comptime T: type, a: T, b: T) i32 {
    var cmp1: i32 = 0;
    var cmp2: i32 = 0;
    if (a > b)
        cmp1 = 1;
    if (a < b)
        cmp2 = 1;
    return cmp1 - cmp2 + 1;
}