toytracer/color.h

15 lines
339 B
C
Raw Normal View History

2020-06-02 22:06:53 +00:00
#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