Skip to content

Instantly share code, notes, and snippets.

@arturaz
Last active July 13, 2017 17:47
Show Gist options
  • Save arturaz/58bb42a5993104a5d8360421b8c66590 to your computer and use it in GitHub Desktop.
Save arturaz/58bb42a5993104a5d8360421b8c66590 to your computer and use it in GitHub Desktop.
static void UpdateCoord(ref float x) { x = x < 0 ? (360 + x) : x; }
public static Vector3 ReCountAngle(Vector3 ang) {
UpdateCoord(ref ang.x);
UpdateCoord(ref ang.y);
UpdateCoord(ref ang.z);
return ang;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment