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