diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-17 17:57:56 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-17 17:57:56 +0100 |
commit | c7286f257ec637f2d67e4b4a2bd1d70b4aff0116 (patch) | |
tree | 8da480abbd204387ba948e235ea3e80a5473e572 | |
parent | 3a621992b292d97f5d45d2d342b19dd2194011cc (diff) |
fix visibility
-rw-r--r-- | src/Panorama.cxx | 5 |
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(); } |