summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Panorama.cxx5
1 files changed, 4 insertions, 1 deletions
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();
}