// Copyright Contributors to the Open Shading Language project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage

shader
test_min_v_int_u_int (output color Cout = 0)
{
    int val = 2*raytype("camera");
    int val2 = 24*val;
                  
    int numerator = int(64*v);
    int red = 0;
    int green = 32;
    int blue = 64;
    
    red = min(numerator, val);
    green = min(numerator, int(v));
    blue = min(int(64*v), val);
    
    if (int(P[0]*64)%2==0) {    
        red = min(numerator, val2);
        green = min(numerator, int(v));
        blue = min(int(64*v), val);
    }    
    
    Cout = color(red/128.0,green/64.0,blue/128.0);
    
}
