Skip to content

Commit f76daeb

Browse files
committed
Handling Surface Acne
1 parent 3108567 commit f76daeb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utilities/rgb.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ struct RGB {
4242
}
4343

4444
friend auto operator << (std::ostream &o, const Self &rhs) -> std::ostream& {
45-
return o << static_cast<i32>(256.0 * std::clamp(std::pow(rhs.r, 1.0 / GAMMA), 0.0, 0.999)) << ' '
46-
<< static_cast<i32>(256.0 * std::clamp(std::pow(rhs.g, 1.0 / GAMMA), 0.0, 0.999)) << ' '
47-
<< static_cast<i32>(256.0 * std::clamp(std::pow(rhs.b, 1.0 / GAMMA), 0.0, 0.999));
45+
return o << static_cast<i32>(256.0 * std::clamp(std::pow(rhs.r != rhs.r ? 0.0 : rhs.r, 1.0 / GAMMA), 0.0, 0.999)) << ' '
46+
<< static_cast<i32>(256.0 * std::clamp(std::pow(rhs.g != rhs.g ? 0.0 : rhs.g, 1.0 / GAMMA), 0.0, 0.999)) << ' '
47+
<< static_cast<i32>(256.0 * std::clamp(std::pow(rhs.b != rhs.b ? 0.0 : rhs.b, 1.0 / GAMMA), 0.0, 0.999));
4848
}
4949

5050
public:

0 commit comments

Comments
 (0)