diff --git a/src/pyunit/pyunit.cpp b/src/pyunit/pyunit.cpp index 9384e308..41b38077 100644 --- a/src/pyunit/pyunit.cpp +++ b/src/pyunit/pyunit.cpp @@ -63,6 +63,23 @@ namespace xo { { return x * y; }) + + .def("__truediv__", + [](const XoQuantity & x, const XoQuantity & y) + { + return x / y; + }) + .def("__truediv__", + [](const XoQuantity & x, double y) + { + return x / y; + }) + .def("__rtruediv__", + [](const XoQuantity & y, double x) + { + return x / y; + }) + .def("__repr__", [](const XoQuantity & x) {