Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Public Function

reverse

Public Function
std.math.CompareOperator.reverse
pub fn reverse(op: CompareOperator) CompareOperator

Reverse the direction of the comparison. Use when swapping the left and right hand operands.

Params

File

math.zig:1634
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
    pub fn reverse(op: CompareOperator) CompareOperator {
        return switch (op) {
            .lt => .gt,
            .lte => .gte,
            .gt => .lt,
            .gte => .lte,
            .eq => .eq,
            .neq => .neq,
        };
    }