Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-29 12:59:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-29 13:01:10 +0300
commit778542fd8fe80f87286d36bb4005314a8343e038 (patch)
tree272d34c618e9cc07b0bac3fc87b6801e3908daa4 /source/blender/python/mathutils
parentc7f67d60fbe24df942bcde49aadf480ac6622e71 (diff)
Cleanup: comments (long lines) in python
Diffstat (limited to 'source/blender/python/mathutils')
-rw-r--r--source/blender/python/mathutils/mathutils.c18
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c3
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c7
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c8
4 files changed, 25 insertions, 11 deletions
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 32ffa4ad2da..d0fa9f5c565 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -381,13 +381,16 @@ int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error
/* LomontRRDCompare4, Ever Faster Float Comparisons by Randy Dillon */
/* XXX We may want to use 'safer' BLI's compare_ff_relative ultimately?
- * LomontRRDCompare4() is an optimized version of Dawson's AlmostEqual2sComplement() (see [1] and [2]).
- * Dawson himself now claims this is not a 'safe' thing to do (pushing ULP method beyond its limits),
- * an recommends using work from [3] instead, which is done in BLI func...
+ * LomontRRDCompare4() is an optimized version of Dawson's AlmostEqual2sComplement()
+ * (see [1] and [2]).
+ * Dawson himself now claims this is not a 'safe' thing to do
+ * (pushing ULP method beyond its limits),
+ * an recommends using work from [3] instead, which is done in BLI func...
*
- * [1] http://www.randydillon.org/Papers/2007/everfast.htm
- * [2] http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
- * [3] https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ instead
+ * [1] http://www.randydillon.org/Papers/2007/everfast.htm
+ * [2] http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
+ * [3] https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
+ * instead.
*/
#define SIGNMASK(i) (-(int)(((unsigned int)(i)) >> 31))
@@ -437,7 +440,8 @@ PyObject *mathutils_dynstr_to_py(struct DynStr *ds)
/* Mathutils Callbacks */
-/* for mathutils internal use only, eventually should re-alloc but to start with we only have a few users */
+/* For mathutils internal use only,
+ * eventually should re-alloc but to start with we only have a few users. */
#define MATHUTILS_TOT_CB 17
static Mathutils_Callback *mathutils_callbacks[MATHUTILS_TOT_CB] = {NULL};
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 6ccb3c2a291..7cc9ba50d90 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -1072,7 +1072,8 @@ static void matrix_invert_safe_internal(const MatrixObject *self, float *r_mat)
if (det == 0.0f) {
const float eps = PSEUDOINVERSE_EPSILON;
- /* We will copy self->matrix into r_mat (if needed), and modify it in place to add diagonal epsilon. */
+ /* We will copy self->matrix into r_mat (if needed),
+ * and modify it in place to add diagonal epsilon. */
in_mat = r_mat;
switch (self->num_col) {
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 7d73f165c1e..29861c56dc0 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -2377,12 +2377,15 @@ static PyObject *Vector_length_squared_get(VectorObject *self, void *UNUSED(clos
* '((%s | SWIZZLE_VALID_AXIS) | '
* '((%s | SWIZZLE_VALID_AXIS) << SWIZZLE_BITS_PER_AXIS) | '
* '((%s | SWIZZLE_VALID_AXIS) << (SWIZZLE_BITS_PER_AXIS * 2)) | '
- * '((%s | SWIZZLE_VALID_AXIS) << (SWIZZLE_BITS_PER_AXIS * 3))) ' %
+ * '((%s | SWIZZLE_VALID_AXIS) << (SWIZZLE_BITS_PER_AXIS * 3))) '
+ * %
* (axis_0_pos, axis_1_pos, axis_2_pos, axis_3_pos))
*
* axises = axises[:-1]
* items = list(axis_dict.items())
- * items.sort(key=lambda a: a[0].replace('x', '0').replace('y', '1').replace('z', '2').replace('w', '3'))
+ * items.sort(
+ * key=lambda a: a[0].replace('x', '0').replace('y', '1').replace('z', '2').replace('w', '3')
+ * )
*
* unique = set()
* for key, val in items:
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index 5fe3536d899..c39954713b1 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -1043,7 +1043,13 @@ static PyObject *M_Geometry_points_in_planes(PyObject *UNUSED(self), PyObject *a
if (len_squared_v3(n3n1) > eps) {
const float quotient = dot_v3v3(N1, n2n3);
if (fabsf(quotient) > eps) {
- /* potentialVertex = (n2n3 * N1[3] + n3n1 * N2[3] + n1n2 * N3[3]) * (-1.0 / quotient); */
+ /**
+ * <pre>
+ * potentialVertex = (
+ * (n2n3 * N1[3] + n3n1 * N2[3] + n1n2 * N3[3]) *
+ * (-1.0 / quotient));
+ * </pre>
+ */
const float quotient_ninv = -1.0f / quotient;
potentialVertex[0] = ((n2n3[0] * N1[3]) + (n3n1[0] * N2[3]) +
(n1n2[0] * N3[3])) *