def test_rotated_around(self): vec = Vec(1, 0, 0) axis = Vec(0, 0, 1) res = vec.rotated_around(axis, pi/4) self.assertEqual(res, Vec(1, 1, 0).normalized()) axis = Vec(1, 1, 1).normalized() res = vec.rotated_around(axis, pi/4) # for the sake of this comparison, let's lower the equality threshold res.set_comparison_accuracy(0.00001) self.assertEqual(res, Vec(0.804738, 0.505879, -0.310617))