From 3d670c83edebbcbef026402dd916862878ec5c3e Mon Sep 17 00:00:00 2001 From: K Tyl Date: Sat, 6 Jun 2020 18:18:20 +0100 Subject: [PATCH] add common header --- src/rtweekend.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/rtweekend.h diff --git a/src/rtweekend.h b/src/rtweekend.h new file mode 100644 index 0000000..2ec65b8 --- /dev/null +++ b/src/rtweekend.h @@ -0,0 +1,29 @@ +#pragma once + +#include +#include +#include +#include + +// usings + +using std::shared_ptr; +using std::make_shared; +using std::sqrt; + +// constants + +const double infinity = std::numeric_limits::infinity(); +const double pi = 3.1415926535897932385; + +// utility functions + +inline double degrees_to_radians(double degrees) +{ + return degrees * pi / 180; +} + +// common headers + +#include "ray.h" +#include "vec3.h"