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

Re: [pygame] Physics module status note



ah, I was under the impression that the OpenGL API also used radians.
In that case I can't object any further.

On Sat, Aug 16, 2008 at 6:39 AM, Marcus von Appen <mva@xxxxxxxxxxxx> wrote:
> On, Sat Aug 16, 2008, Peter Gebauer wrote:
>
>> Hi there, Hugo!
>>
>> Yes, using radians in math-related softare is common, but not in games.
>> It will simply add a call the math.degrees for every call and to increment
>> the angle you'd have to convert it back, or be forced to use radians
>> in the game. If you're drawing using OpenGL or any rotational
>> transformations it will be a lot of calls. I see it as more comfortable when
>> the angles use degrees since graphic drawing is more common than in a game
>> than asin/atan calls.
>> It will also be a miniscule performance enhancenment to do this in C
>> rather than Python which will add up if you do this conversion many times
>> for each polygon you draw. :)
>>
>> So, it's more comfortable to use degrees and it's better suited for use with
>> graphic libraries, which mostly use degrees, including
>> pygame.transform.rotate.
>
> [...]
>
> Seconded. As doing a degrees to radians "just" adds a float
> multiplication and division, it should not be a big deal. I'll add that
> to the TODO list.
>
> Regards
> Marcus
>