xo-pyunit: + division

This commit is contained in:
Roland Conybeare 2024-05-01 08:42:22 -05:00
commit f900c43463

View file

@ -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)
{