Moving at an angle
Greetings
How would i do something like this:
MoveSomeBitmap(&SomeBitmap, 32);
to move it at a 32° angle? Assume I'm using Win32.G
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.)
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.)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement