If it’s really that serious then you can also try quaternions
https://github.com/probablytukars/LuaQuaternion