| 659 | } |
| 660 | |
| 661 | PyObject* RotationPy::number_power_handler(PyObject* self, PyObject* other, PyObject* arg) |
| 662 | { |
| 663 | if (!PyObject_TypeCheck(self, &(RotationPy::Type)) || !PyLong_Check(other) || arg != Py_None) { |
| 664 | PyErr_SetString(PyExc_NotImplementedError, "Not implemented"); |
| 665 | return nullptr; |
| 666 | } |
| 667 | |
| 668 | Rotation a = static_cast<RotationPy*>(self)->value(); |
| 669 | long b = Py::Long(other); |
| 670 | |
| 671 | Vector3d axis; |
| 672 | double rfAngle {}; |
| 673 | |
| 674 | a.getRawValue(axis, rfAngle); |
| 675 | rfAngle *= double(b); |
| 676 | a.setValue(axis, rfAngle); |
| 677 | |
| 678 | return new RotationPy(a); |
| 679 | } |
| 680 | |
| 681 | PyObject* RotationPy::number_add_handler(PyObject* /*self*/, PyObject* /*other*/) |
| 682 | { |
nothing calls this directly
no test coverage detected