static assert(RGB8(10,20,30) * 2 == RGB8(20,40,60)); static assert(UVW8(10,20,30) * 2 == UVW8(20,40,60)); static assert(RGBAf32(10,20,30,40) * 2 == RGBAf32(20,40,60,80)); static assert(RGB8(10,20,30) / 2 == RGB8(5,10,15)); static assert(UVW8(-10,-20,-30) / 2 == UVW8(-5,-10,-15)); static assert(RGBAf32(10,20,30,40) / 2 == RGBAf32(5,10,15,20)); static assert(RGB8(10,20,30) * 2.0 == RGB8(20,40,60)); static assert(UVW8(10,20,30) * 2.0 == UVW8(20,40,60)); static assert(RGBAf32(10,20,30,40) * 2.0 == RGBAf32(20,40,60,80)); static assert(RGB8(10,20,30) * 0.5 == RGB8(5,10,15)); static assert(UVW8(-10,-20,-30) * 0.5 == UVW8(-5,-10,-15)); static assert(RGBAf32(5,10,15,20) * 0.5 == RGBAf32(2.5,5,7.5,10)); static assert(RGB8(10,20,30) / 2.0 == RGB8(5,10,15)); static assert(UVW8(-10,-20,-30) / 2.0 == UVW8(-5,-10,-15)); static assert(RGBAf32(10,20,30,40) / 2.0 == RGBAf32(5,10,15,20)); static assert(RGB8(10,20,30) / 0.5 == RGB8(20,40,60)); static assert(UVW8(10,20,30) / 0.5 == UVW8(20,40,60)); static assert(RGBAf32(10,20,30,40) / 0.5 == RGBAf32(20,40,60,80));
Binary operators.