From 99ac5b94e40b1b95be6ebc061f6dcee4d4dcfed5 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Mon, 9 Mar 2026 21:49:43 +0800 Subject: Establish a well-structured modern C++ project architecture Focus on code quality: Treat strict warnings as errors, memory checks with Sanitizers, Clang formatting and static analysis Performance optimization: LTO, ccache --- raytracing/color.cc | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 raytracing/color.cc (limited to 'raytracing/color.cc') diff --git a/raytracing/color.cc b/raytracing/color.cc deleted file mode 100644 index c1eac72..0000000 --- a/raytracing/color.cc +++ /dev/null @@ -1,15 +0,0 @@ -#include "color.h" - -void write_color(std::ostream &out, const color &pixel_color){ - auto r = pixel_color.x(); - auto g = pixel_color.y(); - auto b = pixel_color.z(); - - // Translate the [0,1] component values to the byte range [0,255]. - int rbyte = int(255.999 * r); - int gbyte = int(255.999 * g); - int bbyte = int(255.999 * b); - - // Write out the pixel color components. - out << rbyte << ' ' << gbyte << ' ' << bbyte << '\n'; -} \ No newline at end of file -- cgit v1.2.3