From 0311987fddb811a52c12ac4b525d41101fb71cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 24 Apr 2019 18:28:17 +0200 Subject: [PATCH] python: make angles implicitly convertible to each other. --- src/python/magnum/math.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/python/magnum/math.cpp b/src/python/magnum/math.cpp index 48e1272..f12391b 100644 --- a/src/python/magnum/math.cpp +++ b/src/python/magnum/math.cpp @@ -166,6 +166,10 @@ void math(py::module& root, py::module& m) { angle(deg); angle(rad); + /* Cyclic convertibility, so can't do that in angle() */ + py::implicitly_convertible(); + py::implicitly_convertible(); + /* BoolVector */ py::class_> boolVector2{root, "BoolVector2", "Two-component bool vector"}; py::class_> boolVector3{root, "BoolVector3", "Three-component bool vector"};