toytracer/color.h
2020-06-03 00:06:53 +02:00

15 lines
339 B
C++

#ifndef COLOR_H
#define COLOR_H
#include <iostream>
#include "vec3.h"
void write_color(std::ostream &out, Color pixel_color) {
out << static_cast<int>(255.999 * pixel_color.x()) << " "
<< static_cast<int>(255.999 * pixel_color.y()) << " "
<< static_cast<int>(255.999 * pixel_color.z()) << "\n";
}
#endif // COLOR_H