convert this curve to a tristimulus cie xyz color by integrating against the cie color matching functions . concode_field_sep double[] CIE_ybar concode_elem_sep int WAVELENGTH_MIN concode_elem_sep double[] CIE_xbar concode_elem_sep int WAVELENGTH_STEP concode_elem_sep int WAVELENGTH_MAX concode_elem_sep double[] CIE_zbar concode_field_sep float sample
XYZColor function ( ) { float loc0 = 0 , loc1 = 0 , loc2 = 0 ; for ( int loc3 = 0 , loc4 = WAVELENGTH_MIN ; loc3 < CIE_xbar . length ; loc3 ++ , loc4 += WAVELENGTH_STEP ) { float loc5 = sample ( loc4 ) ; loc0 += loc5 * CIE_xbar [ loc3 ] ; loc1 += loc5 * CIE_ybar [ loc3 ] ; loc2 += loc5 * CIE_zbar [ loc3 ] ; } return new XYZColor ( loc0 , loc1 , loc2 ) . mul ( WAVELENGTH_STEP ) ; }