BRDFLafortuneFitting.Program.ThetaDiff_index C# (CSharp) Method

ThetaDiff_index() static private method

static private ThetaDiff_index ( double _ThetaDiff ) : int
_ThetaDiff double
return int
        static int ThetaDiff_index( double _ThetaDiff )
        {
            int Index = (int) Math.Floor( _ThetaDiff / (Math.PI * 0.5) * BRDF_SAMPLING_RES_THETA_D );
                Index = Math.Max( 0, Math.Min( Index, BRDF_SAMPLING_RES_THETA_D-1 ) );
            return Index;
        }