xo-pyunit: + subtraction

This commit is contained in:
Roland Conybeare 2024-05-01 10:32:15 -05:00
commit e7e8396543

View file

@ -100,6 +100,24 @@ namespace xo {
return x + y;
})
.def("__sub__",
[](const XoQuantity & x, const XoQuantity & y)
{
return x - y;
})
.def("__sub__",
[](const XoQuantity & x, double y)
{
return x - y;
})
.def("__rsub__",
[](double y, const XoQuantity & x)
{
return x - y;
})
.def("__mul__",
[](const XoQuantity & x, const XoQuantity & y)
{