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.

testInts

signbit.testInts
fn testInts(comptime Type: type) !void

File

lib/std/math/signbit.zig:31

Code

fn testInts(comptime Type: type) !void {
    try expect((std.math.minInt(Type) < 0) == signbit(@as(Type, std.math.minInt(Type))));
    try expect(!signbit(@as(Type, 0)));
    try expect(!signbit(@as(Type, std.math.maxInt(Type))));
}