void TestBisou() {
Random RNG = new Random( 1 );
for ( int i=0; i < 1000; i++ ) {
float3 color = new float3( (float) RNG.NextDouble(), (float) RNG.NextDouble(), (float) RNG.NextDouble() );
float amount = (float) RNG.NextDouble();
float3 ciexyY = RGB2xyY( color );
//ciexyY.z = Math.Min( 1.0f, ciexyY.z * (1.0f + amount) );
ciexyY.z = ciexyY.z * (1.0f + amount);
float3 brightenedColor_xyY = xyY2RGB( ciexyY );
float3 brightenedColor = (1.0f + amount) * color;
bool different = (brightenedColor - brightenedColor_xyY).Length > 1e-3f;
Console.WriteLine( "color ({0}, {1}, {2}) => brightned_xyY ({3}, {4}, {5}), brightned ({6}, {7}, {8})" + (different ? " ####DIFFERENT####" : ""), color.x, color.y, color.z, brightenedColor_xyY.x, brightenedColor_xyY.y, brightenedColor_xyY.z, brightenedColor.x, brightenedColor.y, brightenedColor.z );
}
}