Cleanup: comments (long lines) in python
This commit is contained in:
@@ -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};
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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])) *
|
||||
|
||||
Reference in New Issue
Block a user