xo-pyunit: + subtraction
This commit is contained in:
parent
8c6b01b485
commit
e7e8396543
1 changed files with 18 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue