rename mathutils.Vector/Quaternion difference() method to rotation_difference() since its too vague when applied to vectors.
This commit is contained in:
@@ -189,7 +189,7 @@ static PyObject *Quaternion_dot(QuaternionObject *self, PyObject *value)
|
|||||||
return PyFloat_FromDouble(dot_qtqt(self->quat, tquat));
|
return PyFloat_FromDouble(dot_qtqt(self->quat, tquat));
|
||||||
}
|
}
|
||||||
|
|
||||||
static char Quaternion_difference_doc[] =
|
static char Quaternion_rotation_difference_doc[] =
|
||||||
".. function:: difference(other)\n"
|
".. function:: difference(other)\n"
|
||||||
"\n"
|
"\n"
|
||||||
" Returns a quaternion representing the rotational difference.\n"
|
" Returns a quaternion representing the rotational difference.\n"
|
||||||
@@ -199,7 +199,7 @@ static char Quaternion_difference_doc[] =
|
|||||||
" :return: the rotational difference between the two quat rotations.\n"
|
" :return: the rotational difference between the two quat rotations.\n"
|
||||||
" :rtype: :class:`Quaternion`\n"
|
" :rtype: :class:`Quaternion`\n"
|
||||||
;
|
;
|
||||||
static PyObject *Quaternion_difference(QuaternionObject *self, PyObject *value)
|
static PyObject *Quaternion_rotation_difference(QuaternionObject *self, PyObject *value)
|
||||||
{
|
{
|
||||||
float tquat[QUAT_SIZE], quat[QUAT_SIZE];
|
float tquat[QUAT_SIZE], quat[QUAT_SIZE];
|
||||||
|
|
||||||
@@ -1000,7 +1000,7 @@ static struct PyMethodDef Quaternion_methods[] = {
|
|||||||
/* operation between 2 or more types */
|
/* operation between 2 or more types */
|
||||||
{"cross", (PyCFunction) Quaternion_cross, METH_O, Quaternion_cross_doc},
|
{"cross", (PyCFunction) Quaternion_cross, METH_O, Quaternion_cross_doc},
|
||||||
{"dot", (PyCFunction) Quaternion_dot, METH_O, Quaternion_dot_doc},
|
{"dot", (PyCFunction) Quaternion_dot, METH_O, Quaternion_dot_doc},
|
||||||
{"difference", (PyCFunction) Quaternion_difference, METH_O, Quaternion_difference_doc},
|
{"rotation_difference", (PyCFunction) Quaternion_rotation_difference, METH_O, Quaternion_rotation_difference_doc},
|
||||||
{"slerp", (PyCFunction) Quaternion_slerp, METH_VARARGS, Quaternion_slerp_doc},
|
{"slerp", (PyCFunction) Quaternion_slerp, METH_VARARGS, Quaternion_slerp_doc},
|
||||||
{"rotate", (PyCFunction) Quaternion_rotate, METH_O, Quaternion_rotate_doc},
|
{"rotate", (PyCFunction) Quaternion_rotate, METH_O, Quaternion_rotate_doc},
|
||||||
|
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ static PyObject *Vector_angle(VectorObject *self, PyObject *args)
|
|||||||
return PyFloat_FromDouble(saacos(dot));
|
return PyFloat_FromDouble(saacos(dot));
|
||||||
}
|
}
|
||||||
|
|
||||||
static char Vector_difference_doc[] =
|
static char Vector_rotation_difference_doc[] =
|
||||||
".. function:: difference(other)\n"
|
".. function:: difference(other)\n"
|
||||||
"\n"
|
"\n"
|
||||||
" Returns a quaternion representing the rotational difference between this vector and another.\n"
|
" Returns a quaternion representing the rotational difference between this vector and another.\n"
|
||||||
@@ -627,7 +627,7 @@ static char Vector_difference_doc[] =
|
|||||||
"\n"
|
"\n"
|
||||||
" .. note:: 2D vectors raise an :exc:`AttributeError`.\n"
|
" .. note:: 2D vectors raise an :exc:`AttributeError`.\n"
|
||||||
;
|
;
|
||||||
static PyObject *Vector_difference(VectorObject *self, PyObject *value)
|
static PyObject *Vector_rotation_difference(VectorObject *self, PyObject *value)
|
||||||
{
|
{
|
||||||
float quat[4], vec_a[3], vec_b[3];
|
float quat[4], vec_a[3], vec_b[3];
|
||||||
|
|
||||||
@@ -2136,7 +2136,7 @@ static struct PyMethodDef Vector_methods[] = {
|
|||||||
{"cross", (PyCFunction) Vector_cross, METH_O, Vector_cross_doc},
|
{"cross", (PyCFunction) Vector_cross, METH_O, Vector_cross_doc},
|
||||||
{"dot", (PyCFunction) Vector_dot, METH_O, Vector_dot_doc},
|
{"dot", (PyCFunction) Vector_dot, METH_O, Vector_dot_doc},
|
||||||
{"angle", (PyCFunction) Vector_angle, METH_VARARGS, Vector_angle_doc},
|
{"angle", (PyCFunction) Vector_angle, METH_VARARGS, Vector_angle_doc},
|
||||||
{"difference", (PyCFunction) Vector_difference, METH_O, Vector_difference_doc},
|
{"rotation_difference", (PyCFunction) Vector_rotation_difference, METH_O, Vector_rotation_difference_doc},
|
||||||
{"project", (PyCFunction) Vector_project, METH_O, Vector_project_doc},
|
{"project", (PyCFunction) Vector_project, METH_O, Vector_project_doc},
|
||||||
{"lerp", (PyCFunction) Vector_lerp, METH_VARARGS, Vector_lerp_doc},
|
{"lerp", (PyCFunction) Vector_lerp, METH_VARARGS, Vector_lerp_doc},
|
||||||
{"rotate", (PyCFunction) Vector_rotate, METH_O, Vector_rotate_doc},
|
{"rotate", (PyCFunction) Vector_rotate, METH_O, Vector_rotate_doc},
|
||||||
|
|||||||
Reference in New Issue
Block a user