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


shader a_v_b_vconditional (output vector cout = 0, output vector mcout = 0) 
{
    int a = int(P[0])*10;
    int b = (P[1] > 0.75);
    
    int c = a&b;
    
    cout = vector(tan(u), tan(P[0]/c), v*u);
    vector mcout_ = cout;
    
    if(int(P[0]*32)%2)
    {
        a = int(u)*2;
        b = (v < 0.5);
        c = a&b;
        cout = vector(tan(u/c), tan(v/c), P[2]);
    }
    
    mcout = mcout_;
}
