The ExtractRotation function in OpenTK does not work correctly
if the sum of the main diagonal of the rotation matrix is close to -1.
This commit adds a fixed ExtractRotation function, with the same fixes
that were applied to the Blender function from which it was copied.
Also, the lights exporting code is changed to use the fixed function.
The ExtractRotation function in OpenTK does not work correctly if the sum of the main diagonal of the rotation matrix is close to -1. This commit adds a fixed ExtractRotation function, with the same fixes that were applied to the Blender function from which it was copied. Also, the lights exporting code is changed to use the fixed function.