mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:24:22 +02:00
Update normalizeDegrees to be exclusive on the -180 end
This commit is contained in:
parent
06ab17987b
commit
ce4d407378
1 changed files with 2 additions and 1 deletions
|
@ -200,9 +200,10 @@ SelectionManager = (function() {
|
|||
return that;
|
||||
})();
|
||||
|
||||
// Normalize degrees to be in the range (-180, 180]
|
||||
function normalizeDegrees(degrees) {
|
||||
while (degrees > 180) degrees -= 360;
|
||||
while (degrees < -180) degrees += 360;
|
||||
while (degrees <= -180) degrees += 360;
|
||||
return degrees;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue