[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: Rotating an image so much that it looks at a Vector



Dave LeCompte (really) wrote:


> Arccosine isn't necessary; arctangent is probably the best function to
> use. For example:
> 
>>>> import math
>>>> math.degrees(math.atan2(3,4))
> 36.86989764584402
> 
> which tells you that one of your angles is about 37 degrees.
> 
> 
> This is pretty well documented in the Python docs:
> http://docs.python.org/lib/module-math.html
> 
> And if you need to review your trigonometry, Wikipedia is, of course, a
> reference:
> http://en.wikipedia.org/wiki/Trigonometric_function
> 
> 
> -Dave LeCompte


Hi Dave,
thank you very much now it works, Thank you.