Improved ToEulerAngles function Should finally fix the rotation bugs in HedgeEdit.
Improved ToEulerAngles function
Should finally fix the rotation bugs in HedgeEdit.

Before you think I just copy-pasted this without even trying lol I spent days trying every formula/code snippet I could find and couldn't get anything that was accurate enough to how the game does it.
Absolutely nothing worked as intended 100% of the time, everything would return correct euler angle values for certain quaternions and incorrect euler angle values for others.
I started poking around at other random level editor projects to see how they did it still to no avail.
Finally the thought hit me: "wait... how does GLvl do it?"
Sure enough it not only works beautifully every time, but it's also somehow the simplest/most efficient out of all the stuff I tried.

*so there you go*

Radfordhound/HedgeLib,Radfordhound/HedgeLib