• Advertisement
Sign in to follow this  

Moving at an angle

This topic is 4875 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings How would i do something like this: MoveSomeBitmap(&SomeBitmap, 32); to move it at a 32° angle? Assume I'm using Win32.G

Share this post


Link to post
Share on other sites
Advertisement
deltax = delta * cos(angle);
deltay = delta * sin(angle);

where delta is the displacement length and angle is the direction of movement (0° means in x direction, 90° in y direction etc.)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement