diff options
Diffstat (limited to 'src/color.cpp')
| -rw-r--r-- | src/color.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/color.cpp b/src/color.cpp index 2777d39..53a79f9 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -1,7 +1,7 @@ #include "color.hpp" -void write_color(std::ostream& out, color pixel_color) { - out << pixel_color.x << ' ' - << pixel_color.y << ' ' - << pixel_color.z << ' '; +void write_color(std::ostream& out, const color& pixel_color) { + out << static_cast<uint32_t>(255.0 * pixel_color.x) << ' ' + << static_cast<uint32_t>(255.0 * pixel_color.y) << ' ' + << static_cast<uint32_t>(255.0 * pixel_color.z) << std::endl; } |
