template<class StorT>
Definition at line 25 of file UpoRGB2rg.h. 00026 { 00027 Real64 total = RGB[0] + RGB[1] + RGB[2]; 00028 if(fabs(total) < 0.00001) { 00029 rg[0] = 1.0 / 3.0; 00030 rg[1] = 1.0 / 3.0; 00031 rg[2] = 1.0 / 3.0; 00032 } 00033 else 00034 { 00035 rg[0] = RGB[0] / total; 00036 rg[1] = RGB[1] / total; 00037 rg[2] = RGB[2] / total; 00038 } 00039 }
|