Re: [AD] rotate direction |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] rotate direction
- From: "Trent Gamblin" <trent@xxxxxxxxxx>
- Date: Sun, 26 Oct 2008 15:01:29 -0600 (MDT)
On Sun, October 26, 2008 2:57 pm, Elias Pschernig said:
> On Sun, 2008-10-26 at 14:53 -0600, Trent Gamblin wrote:
>> Writing some code for my game I came to realize that the C trig
>> function sin behaves differently than the al_draw_rotated_*
>> functions. "sin" starts at 0 (3 o'clock) and moves clockwise so
>> that
>> pi/2 is at 6 o'clock. The allegro functions however go counter
>> clockwise, starting at the same 0 with pi/2 at 12 o'clock.
>
> What do you mean?
>
> sin(0) = 0
> sin(pi/2) = 1
>
> There's no clockwise in there..
What I meant is 1 in screen coordinates moves down the screen
whereas al_draw_rotated_bitmap(... pi/2 ...) will move thing up
towards the top of the screen.
Trent :{)>