modified to improve robustness at boarder cases for rotation,basis,angle_axis conversions