Skip to content

MIN2

MIN2

Description

Returns the smaller of two values x and y.

Parameters

Name Direction Description
x in First value for comparison.
y in Second value for comparison.

Success

Returns the smaller of x and y.

Failure

Function cannot fail - always returns a value.

Usage example (Cross-references)

Usage examples (Cross-references)
            if (precision > 0) {
                StrPushBack(&result, '.');
                StrPushBackCstr(&result, dot + 1, MIN2(frac, (u64)precision));
                for (u32 i = (u32)MIN2(frac, (u64)precision); i < precision; i++) {
                    StrPushBack(&result, '0');
                StrPushBack(&result, '.');
                StrPushBackCstr(&result, dot + 1, MIN2(frac, (u64)precision));
                for (u32 i = (u32)MIN2(frac, (u64)precision); i < precision; i++) {
                    StrPushBack(&result, '0');
                }
                        len = 0;
                    } else {
                        len = MIN2(len, fmt_info->precision);
                    }
                }
                        len = 0;
                    } else {
                        len = MIN2(len, fmt_info->precision);
                    }
                }
    
        u64 bytes_needed  = IntByteLength(value);
        u64 bytes_to_copy = MIN2(bytes_needed, max_len);
    
        if (bytes_to_copy == 0) {
    
        u64 bytes_needed  = IntByteLength(value);
        u64 bytes_to_copy = MIN2(bytes_needed, max_len);
    
        if (bytes_to_copy == 0) {
        ValidateBitVec(b);
    
        u64 min_len = MIN2(a->length, b->length);
        BitVecResize(result, min_len);
        ValidateBitVec(bv2);
    
        u64 min_len = MIN2(bv1->length, bv2->length);
    
        // Compare common bits using range comparison
    
        // Disjoint if no common 1-bits
        u64 min_len = MIN2(bv1->length, bv2->length);
    
        for (u64 i = 0; i < min_len; i++) {
        ValidateBitVec(bv2);
    
        u64 min_length = MIN2(bv1->length, bv2->length);
        u64 max_length = MAX2(bv1->length, bv2->length);
        u64 distance   = 0;
        ValidateBitVec(bv2);
    
        u64 min_length = MIN2(bv1->length, bv2->length);
        u64 product    = 0;
        ValidateBitVec(bv2);
    
        u64 min_length = MIN2(bv1->length, bv2->length);
        int score      = 0;
    ///
    /// TAGS: Math, Utility, Range
    #define CLAMP(x, lo, hi) MIN2(MAX2(lo, x), hi)
    
    ///
Last updated on