diff options
-rw-r--r-- | aa.h | 1 | ||||
-rw-r--r-- | viewport.h | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -48,6 +48,7 @@ public: samples(samples), threads((threads > 0) ? threads : (int) std::thread::hardware_concurrency()) { assert(samples >= 1); + assert(std::abs(1.0 * image_width / image_height - 1.0 * screen_hw / screen_hh) < 1e-8); } aa_viewport(const vec3<V> &cxyz, @@ -75,7 +75,9 @@ public: cxyz{cxyz}, screen_center{screen_center}, image_width{image_width}, image_height{image_height}, screen_hw{screen_hw}, screen_hh{screen_hh}, - world{world} {} + world{world} { + assert(std::abs(1.0 * image_width / image_height - 1.0 * screen_hw / screen_hh) < 1e-8); + } /** * Generate the image seen on given viewpoint. |