MIN2

Table of Contents

MIN2

Description

Returns the smaller of two values x and y.

Parameters

NameDirectionDescription
xinFirst value for comparison.
yinSecond value for comparison.

Success

Returns the smaller of x and y.

Failure

Function cannot fail - always returns a value.

Usage example (Cross-references)

    ///
    /// TAGS: Math, Utility, Range
    #define CLAMP(x, lo, hi) MIN2(MAX2(lo, x), hi)
    
    ///
    len = 0;
    } else {
    len = MIN2(len, fmt_info->precision);
    }
    }
    len = 0;
    } else {
    len = MIN2(len, fmt_info->precision);
    }
    }
    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;

Share :