Base: fix __pow__ operator in MatrixPy/PlacementPy/RotationPy
This commit is contained in:
@@ -363,11 +363,11 @@ PyObject * PlacementPy::number_power_handler (PyObject* self, PyObject* other, P
|
||||
return new PlacementPy(Placement());
|
||||
|
||||
if(b < 0) {
|
||||
b = 1+b;
|
||||
b = -b;
|
||||
a.invert();
|
||||
}
|
||||
auto res = a;
|
||||
for(;b;--b)
|
||||
for(--b;b;--b)
|
||||
res *= a;
|
||||
return new PlacementPy(res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user