Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DataGreed/a84b295ade22a6d2a1b4296dcf9ff01e to your computer and use it in GitHub Desktop.
Save DataGreed/a84b295ade22a6d2a1b4296dcf9ff01e to your computer and use it in GitHub Desktop.
rotate Vector2
public static class Vector2Extension
{
public static Vector2 Rotate(this Vector2 v, float degrees)
{
return Quaternion.Euler(0, 0, degrees) * v;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment