Vector Rotation
Posted: Sat Oct 12, 2013 5:14 pm
I'm trying to make my own vector module, and for the most part it works (as far as I know), but in trying to add rotation I'm getting unexpected results.
I'm not 100% sure whether the results are right, and my expectations are wrong, or vice versa.
I'm rotating a 3D vector by an angle 'a', and then rotating it by '-a'. But it doesn't end up the same as it started.
The vector rotation code is on lines 166 through to 181.
I know and don't mind that it assumes the vector is 3D.
Can anyone please help?
I'm not 100% sure whether the results are right, and my expectations are wrong, or vice versa.
I'm rotating a 3D vector by an angle 'a', and then rotating it by '-a'. But it doesn't end up the same as it started.
The vector rotation code is on lines 166 through to 181.
I know and don't mind that it assumes the vector is 3D.
Can anyone please help?