From c7286f257ec637f2d67e4b4a2bd1d70b4aff0116 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Sun, 17 Dec 2006 17:57:56 +0100 Subject: fix visibility --- src/Panorama.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Panorama.cxx b/src/Panorama.cxx index b6c0c10..32e5de2 100644 --- a/src/Panorama.cxx +++ b/src/Panorama.cxx @@ -504,7 +504,10 @@ int Panorama::is_visible(double a_alph) { double center_dist; - center_dist = fabs(fmod(a_alph - parms.a_center, 2.0 * pi_d)); + center_dist = fabs(a_alph - parms.a_center); + if (center_dist > pi_d) { + center_dist = 2*pi_d - center_dist; + } return center_dist < proj->get_view_angle(); } -- cgit v1.2.3