|
|
|
|
@ -269,8 +269,10 @@ template<class T> void quaternion(py::module_& m, py::class_<T>& c) {
|
|
|
|
|
m |
|
|
|
|
.def("dot", static_cast<typename T::Type(*)(const T&, const T&)>(&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<T(*)(const T&, const T&, typename T::Type)>(&Math::lerp), |
|
|
|
|
"Linear interpolation of two quaternions", py::arg("normalized_a"), py::arg("normalized_b"), py::arg("t")) |
|
|
|
|
|