mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 01:26:39 +00:00 
			
		
		
		
	-improved trigonometric precision
-cleanup
This commit is contained in:
		
							parent
							
								
									5248917a6c
								
							
						
					
					
						commit
						bbca942601
					
				
					 2 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -48,7 +48,6 @@ namespace MWMechanics
 | 
			
		|||
            float mMaxDist;
 | 
			
		||||
            float mRemainingDuration; // In seconds
 | 
			
		||||
 | 
			
		||||
            //PathFinder mPathFinder;
 | 
			
		||||
            int mCellX;
 | 
			
		||||
            int mCellY;
 | 
			
		||||
    };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -280,7 +280,7 @@ namespace MWMechanics
 | 
			
		|||
        float directionY = nextPoint.mY - y;
 | 
			
		||||
        float directionResult = sqrt(directionX * directionX + directionY * directionY);
 | 
			
		||||
 | 
			
		||||
        return Ogre::Radian(Ogre::Math::ACos(directionY / directionResult) * sgn(Ogre::Math::ASin(directionX / directionResult))).valueDegrees();
 | 
			
		||||
        return Ogre::Math::ATan2(directionX,directionY).valueDegrees();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bool PathFinder::checkWaypoint(float x, float y, float z)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue