What are atan and atan2 used for in games?
        Posted  
        
            by 
                kyrogue
            
        on Game Development
        
        See other posts from Game Development
        
            or by kyrogue
        
        
        
        Published on 2011-07-08T02:03:19Z
        Indexed on 
            2012/12/14
            5:22 UTC
        
        
        Read the original article
        Hit count: 315
        
math
I am having some trouble understanding Math.tan() and Math.atan() and Math.atan2().
I have basic knowledge of trigonmetry but the usage of SIN, COS, and TAN etc for game development is very new to me.
I am reading on some tutorials and I see that by using tangent we can get the angle in which one object needs to be rotated by how much to face another object for example my mouse. So why do we still need to use atan or atan2?
© Game Development or respective owner