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.

neg

divmodei4.neg
inline fn neg(out: []u32, in: []const u32) void

File

lib/compiler_rt/divmodei4.zig:21

Code

inline fn neg(out: []u32, in: []const u32) void {
    var ov: u1 = 1;
    for (0..in.len) |limb_index| {
        const new, ov = @addWithOverflow(~in[limb(limb_index, in.len)], ov);
        out[limb(limb_index, out.len)] = new;
    }
}