xo-pyunit: + division
This commit is contained in:
parent
9bea04bfa2
commit
f900c43463
1 changed files with 17 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue