Skip to content

Instantly share code, notes, and snippets.

@fengye
Created March 22, 2011 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fengye/881033 to your computer and use it in GitHub Desktop.
Save fengye/881033 to your computer and use it in GitHub Desktop.
/* Function: al_transform_rotation
*/
void al_transform_rotation(const ALLEGRO_TRANSFORM *trans, float* rotation)
{
float t = *rotation;
*rotation = t - atan2f(trans->m[0][1], trans->m[0][0]);
}
@fengye
Copy link
Author

fengye commented Mar 22, 2011

Added in transformations.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment