Merge commit '6c1934fcdf7dc91897e9d4dc8b8b6810b1de6a51' into next
This commit is contained in:
commit
46c4b134c6
1 changed files with 8 additions and 4 deletions
|
@ -310,11 +310,15 @@ FGViewer::setGoalPitchOffset_deg (double goal_pitch_offset_deg)
|
|||
{
|
||||
_dirty = true;
|
||||
_goal_pitch_offset_deg = goal_pitch_offset_deg;
|
||||
if ( _goal_pitch_offset_deg < -90 ) {
|
||||
_goal_pitch_offset_deg = -90.0;
|
||||
/* The angle is set to 1/1000th of a degree from the poles to avoid the
|
||||
* singularity where the azimuthal angle becomes undefined, inducing optical
|
||||
* artefacts. The arbitrary angle offset is visually unnoticeable while
|
||||
* avoiding any possible floating point truncation artefacts. */
|
||||
if ( _goal_pitch_offset_deg < -89.999 ) {
|
||||
_goal_pitch_offset_deg = -89.999;
|
||||
}
|
||||
if ( _goal_pitch_offset_deg > 90.0 ) {
|
||||
_goal_pitch_offset_deg = 90.0;
|
||||
if ( _goal_pitch_offset_deg > 89.999 ) {
|
||||
_goal_pitch_offset_deg = 89.999;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue