xo-pyunit: + equality comparison

This commit is contained in:
Roland Conybeare 2024-05-01 10:41:37 -05:00
commit 692b26754c

View file

@ -150,6 +150,24 @@ namespace xo {
return x / y;
})
.def("__eq__",
[](const XoQuantity & x, const XoQuantity & y)
{
return x == y;
})
.def("__eq__",
[](const XoQuantity & x, double y)
{
return x == y;
})
.def("__req__",
[](const XoQuantity & y, double x)
{
return x == y;
})
.def("__repr__",
[](const XoQuantity & x)
{