Cleanup: comment blocks, trailing space in comments

This commit is contained in:
2021-06-24 15:56:58 +10:00
parent 2e99a74df9
commit 4b9ff3cd42
578 changed files with 1154 additions and 1125 deletions

View File

@@ -619,9 +619,9 @@ static PySequenceMethods Euler_SeqMethods = {
(binaryfunc)NULL, /* sq_concat */
(ssizeargfunc)NULL, /* sq_repeat */
(ssizeargfunc)Euler_item, /* sq_item */
(ssizessizeargfunc)NULL, /* sq_slice, deprecated */
(ssizessizeargfunc)NULL, /* sq_slice (deprecated) */
(ssizeobjargproc)Euler_ass_item, /* sq_ass_item */
(ssizessizeobjargproc)NULL, /* sq_ass_slice, deprecated */
(ssizessizeobjargproc)NULL, /* sq_ass_slice (deprecated) */
(objobjproc)NULL, /* sq_contains */
(binaryfunc)NULL, /* sq_inplace_concat */
(ssizeargfunc)NULL, /* sq_inplace_repeat */

View File

@@ -340,7 +340,7 @@ Mathutils_Callback mathutils_matrix_translation_cb = {
mathutils_matrix_translation_set_index,
};
/* matrix column callbacks, this is so you can do matrix.translation = Vector() */
/* matrix column callbacks, this is so you can do `matrix.translation = Vector()`. */
/* ----------------------------------mathutils.Matrix() ----------------- */
/* mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc. */
@@ -373,7 +373,7 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_XDECREF(item);
if (num_col >= 2 && num_col <= 4) {
/* sane row & col size, new matrix and assign as slice */
/* Sane row & col size, new matrix and assign as slice. */
PyObject *matrix = Matrix_CreatePyObject(NULL, num_col, num_row, type);
if (Matrix_ass_slice((MatrixObject *)matrix, 0, INT_MAX, arg) == 0) {
return matrix;
@@ -3154,15 +3154,15 @@ static PyGetSetDef Matrix_getseters[] = {
/*-----------------------METHOD DEFINITIONS ----------------------*/
static struct PyMethodDef Matrix_methods[] = {
/* derived values */
/* Derived values. */
{"determinant", (PyCFunction)Matrix_determinant, METH_NOARGS, Matrix_determinant_doc},
{"decompose", (PyCFunction)Matrix_decompose, METH_NOARGS, Matrix_decompose_doc},
/* in place only */
/* In place only. */
{"zero", (PyCFunction)Matrix_zero, METH_NOARGS, Matrix_zero_doc},
{"identity", (PyCFunction)Matrix_identity, METH_NOARGS, Matrix_identity_doc},
/* operate on original or copy */
/* Operate on original or copy. */
{"transpose", (PyCFunction)Matrix_transpose, METH_NOARGS, Matrix_transpose_doc},
{"transposed", (PyCFunction)Matrix_transposed, METH_NOARGS, Matrix_transposed_doc},
{"normalize", (PyCFunction)Matrix_normalize, METH_NOARGS, Matrix_normalize_doc},
@@ -3176,26 +3176,26 @@ static struct PyMethodDef Matrix_methods[] = {
{"to_2x2", (PyCFunction)Matrix_to_2x2, METH_NOARGS, Matrix_to_2x2_doc},
{"to_3x3", (PyCFunction)Matrix_to_3x3, METH_NOARGS, Matrix_to_3x3_doc},
{"to_4x4", (PyCFunction)Matrix_to_4x4, METH_NOARGS, Matrix_to_4x4_doc},
/* TODO. {"resize_3x3", (PyCFunction) Matrix_resize3x3, METH_NOARGS, Matrix_resize3x3_doc}, */
/* TODO: {"resize_3x3", (PyCFunction) Matrix_resize3x3, METH_NOARGS, Matrix_resize3x3_doc}, */
{"resize_4x4", (PyCFunction)Matrix_resize_4x4, METH_NOARGS, Matrix_resize_4x4_doc},
{"rotate", (PyCFunction)Matrix_rotate, METH_O, Matrix_rotate_doc},
/* return converted representation */
/* Return converted representation. */
{"to_euler", (PyCFunction)Matrix_to_euler, METH_VARARGS, Matrix_to_euler_doc},
{"to_quaternion", (PyCFunction)Matrix_to_quaternion, METH_NOARGS, Matrix_to_quaternion_doc},
{"to_scale", (PyCFunction)Matrix_to_scale, METH_NOARGS, Matrix_to_scale_doc},
{"to_translation", (PyCFunction)Matrix_to_translation, METH_NOARGS, Matrix_to_translation_doc},
/* operation between 2 or more types */
/* Operation between 2 or more types. */
{"lerp", (PyCFunction)Matrix_lerp, METH_VARARGS, Matrix_lerp_doc},
{"copy", (PyCFunction)Matrix_copy, METH_NOARGS, Matrix_copy_doc},
{"__copy__", (PyCFunction)Matrix_copy, METH_NOARGS, Matrix_copy_doc},
{"__deepcopy__", (PyCFunction)Matrix_deepcopy, METH_VARARGS, Matrix_copy_doc},
/* base-math methods */
/* Base-math methods. */
{"freeze", (PyCFunction)BaseMathObject_freeze, METH_NOARGS, BaseMathObject_freeze_doc},
/* class methods */
/* Class methods. */
{"Identity", (PyCFunction)C_Matrix_Identity, METH_VARARGS | METH_CLASS, C_Matrix_Identity_doc},
{"Rotation", (PyCFunction)C_Matrix_Rotation, METH_VARARGS | METH_CLASS, C_Matrix_Rotation_doc},
{"Scale", (PyCFunction)C_Matrix_Scale, METH_VARARGS | METH_CLASS, C_Matrix_Scale_doc},
@@ -3478,7 +3478,7 @@ int Matrix_Parse4x4(PyObject *o, void *p)
* special type for alternate access */
typedef struct {
PyObject_HEAD /* required python macro */
PyObject_HEAD /* Required Python macro. */
MatrixObject *matrix_user;
eMatrixAccess_t type;
} MatrixAccessObject;

View File

@@ -1407,11 +1407,11 @@ static void quat__axis_angle_sanitize(float axis[3], float *angle)
/* -----------------------METHOD DEFINITIONS ---------------------- */
static struct PyMethodDef Quaternion_methods[] = {
/* in place only */
/* In place only. */
{"identity", (PyCFunction)Quaternion_identity, METH_NOARGS, Quaternion_identity_doc},
{"negate", (PyCFunction)Quaternion_negate, METH_NOARGS, Quaternion_negate_doc},
/* operate on original or copy */
/* Operate on original or copy. */
{"conjugate", (PyCFunction)Quaternion_conjugate, METH_NOARGS, Quaternion_conjugate_doc},
{"conjugated", (PyCFunction)Quaternion_conjugated, METH_NOARGS, Quaternion_conjugated_doc},
@@ -1421,7 +1421,7 @@ static struct PyMethodDef Quaternion_methods[] = {
{"normalize", (PyCFunction)Quaternion_normalize, METH_NOARGS, Quaternion_normalize_doc},
{"normalized", (PyCFunction)Quaternion_normalized, METH_NOARGS, Quaternion_normalized_doc},
/* return converted representation */
/* Return converted representation. */
{"to_euler", (PyCFunction)Quaternion_to_euler, METH_VARARGS, Quaternion_to_euler_doc},
{"to_matrix", (PyCFunction)Quaternion_to_matrix, METH_NOARGS, Quaternion_to_matrix_doc},
{"to_axis_angle",
@@ -1437,7 +1437,7 @@ static struct PyMethodDef Quaternion_methods[] = {
METH_NOARGS,
Quaternion_to_exponential_map_doc},
/* operation between 2 or more types */
/* Operation between 2 or more types. */
{"cross", (PyCFunction)Quaternion_cross, METH_O, Quaternion_cross_doc},
{"dot", (PyCFunction)Quaternion_dot, METH_O, Quaternion_dot_doc},
{"rotation_difference",
@@ -1451,7 +1451,7 @@ static struct PyMethodDef Quaternion_methods[] = {
METH_O,
Quaternion_make_compatible_doc},
/* base-math methods */
/* Base-math methods. */
{"freeze", (PyCFunction)BaseMathObject_freeze, METH_NOARGS, BaseMathObject_freeze_doc},
{"copy", (PyCFunction)Quaternion_copy, METH_NOARGS, Quaternion_copy_doc},

View File

@@ -2974,11 +2974,11 @@ static struct PyMethodDef Vector_methods[] = {
{"Linspace", (PyCFunction)C_Vector_Linspace, METH_VARARGS | METH_CLASS, C_Vector_Linspace_doc},
{"Repeat", (PyCFunction)C_Vector_Repeat, METH_VARARGS | METH_CLASS, C_Vector_Repeat_doc},
/* in place only */
/* In place only. */
{"zero", (PyCFunction)Vector_zero, METH_NOARGS, Vector_zero_doc},
{"negate", (PyCFunction)Vector_negate, METH_NOARGS, Vector_negate_doc},
/* operate on original or copy */
/* Operate on original or copy. */
{"normalize", (PyCFunction)Vector_normalize, METH_NOARGS, Vector_normalize_doc},
{"normalized", (PyCFunction)Vector_normalized, METH_NOARGS, Vector_normalized_doc},
@@ -2994,7 +2994,7 @@ static struct PyMethodDef Vector_methods[] = {
{"to_track_quat", (PyCFunction)Vector_to_track_quat, METH_VARARGS, Vector_to_track_quat_doc},
{"orthogonal", (PyCFunction)Vector_orthogonal, METH_NOARGS, Vector_orthogonal_doc},
/* operation between 2 or more types */
/* Operation between 2 or more types. */
{"reflect", (PyCFunction)Vector_reflect, METH_O, Vector_reflect_doc},
{"cross", (PyCFunction)Vector_cross, METH_O, Vector_cross_doc},
{"dot", (PyCFunction)Vector_dot, METH_O, Vector_dot_doc},
@@ -3009,7 +3009,7 @@ static struct PyMethodDef Vector_methods[] = {
{"slerp", (PyCFunction)Vector_slerp, METH_VARARGS, Vector_slerp_doc},
{"rotate", (PyCFunction)Vector_rotate, METH_O, Vector_rotate_doc},
/* base-math methods */
/* Base-math methods. */
{"freeze", (PyCFunction)BaseMathObject_freeze, METH_NOARGS, BaseMathObject_freeze_doc},
{"copy", (PyCFunction)Vector_copy, METH_NOARGS, Vector_copy_doc},
@@ -3105,12 +3105,12 @@ PyTypeObject vector_Type = {
NULL, /* allocfunc tp_alloc; */
Vector_new, /* newfunc tp_new; */
/* Low-level free-memory routine */
NULL, /* freefunc tp_free; */
NULL, /* freefunc tp_free; */
/* For PyObject_IS_GC */
NULL, /* inquiry tp_is_gc; */
NULL, /* inquiry tp_is_gc; */
NULL, /* PyObject *tp_bases; */
/* method resolution order */
NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_mro; */
NULL, /* PyObject *tp_cache; */
NULL, /* PyObject *tp_subclasses; */
NULL, /* PyObject *tp_weaklist; */

View File

@@ -93,7 +93,7 @@
#define MIXBITS(u, v) (((u)&UMASK) | ((v)&LMASK))
#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL))
static ulong state[N]; /* the array for the state vector */
static ulong state[N]; /* The array for the state vector. */
static int left = 1;
static int initf = 0;
static ulong *next;
@@ -106,10 +106,10 @@ static void init_genrand(ulong s)
state[0] = s & 0xffffffffUL;
for (j = 1; j < N; j++) {
state[j] = (1812433253UL * (state[j - 1] ^ (state[j - 1] >> 30)) + j);
/* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
/* In the previous versions, MSBs of the seed affect */
/* only MSBs of the array state[]. */
/* 2002/01/09 modified by Makoto Matsumoto */
/* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier.
* In the previous versions, MSBs of the seed affect
* only MSBs of the array state[].
* 2002/01/09 modified by Makoto Matsumoto. */
state[j] &= 0xffffffffUL; /* for >32 bit machines */
}
left = 1;