MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / number_power_handler

Method number_power_handler

src/Base/RotationPyImp.cpp:661–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

659}
660
661PyObject* 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
681PyObject* RotationPy::number_add_handler(PyObject* /*self*/, PyObject* /*other*/)
682{

Callers

nothing calls this directly

Calls 3

valueMethod · 0.45
getRawValueMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected