From 4758cf763f7f762dd8110fd6ed2b3de4a68cbd94 Mon Sep 17 00:00:00 2001 From: Keuin Date: Wed, 20 Apr 2022 02:58:37 +0800 Subject: Assert screen and image are of the same aspect in aa_viewport::aa_viewport and basic_viewport::basic_viewport. --- aa.h | 1 + 1 file changed, 1 insertion(+) (limited to 'aa.h') diff --git a/aa.h b/aa.h index 9622696..a1bb51e 100644 --- a/aa.h +++ b/aa.h @@ -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 &cxyz, -- cgit v1.2.3