diff --git a/src/python/magnum/math.cpp b/src/python/magnum/math.cpp index 4e87233..fff1189 100644 --- a/src/python/magnum/math.cpp +++ b/src/python/magnum/math.cpp @@ -269,8 +269,10 @@ template void quaternion(py::module_& m, py::class_& c) { m .def("dot", static_cast(&Math::dot), "Dot product between two quaternions") - .def("angle", [](const T& a, const T& b) { - return Radd(Math::angle(a, b)); + .def("half_angle", [](const T& a, const T& b) { + /** @todo switch back to angle() once it's reintroduced with the + correct output again */ + return Radd(Math::halfAngle(a, b)); }, "Angle between normalized quaternions", py::arg("normalized_a"), py::arg("normalized_b")) .def("lerp", static_cast(&Math::lerp), "Linear interpolation of two quaternions", py::arg("normalized_a"), py::arg("normalized_b"), py::arg("t")) diff --git a/src/python/magnum/test/test_math.py b/src/python/magnum/test/test_math.py index 6df7e1d..0a71492 100644 --- a/src/python/magnum/test/test_math.py +++ b/src/python/magnum/test/test_math.py @@ -1144,8 +1144,8 @@ class Quaternion_(unittest.TestCase): self.assertAlmostEqual(float(Deg(a.angle())), float(Deg(45.0)), 4) def test_functions(self): - a = math.angle(Quaterniond.rotation(Deg(45.0), Vector3d.x_axis()), - Quaterniond.rotation(Deg(75.0), Vector3d.x_axis())) + a = math.half_angle(Quaterniond.rotation(Deg(45.0), Vector3d.x_axis()), + Quaterniond.rotation(Deg(75.0), Vector3d.x_axis())) self.assertEqual(Deg(a), Deg(15.0)) def test_properties(self):