Skip to content

Instantly share code, notes, and snippets.

@fengye
Created March 22, 2011 10:31
Show Gist options
  • Select an option

  • Save fengye/881033 to your computer and use it in GitHub Desktop.

Select an option

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

fengye commented Mar 22, 2011

Copy link
Copy Markdown
Author

Added in transformations.c

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