From eb3ff1d6f9ca231f7cfde4a5b8255fa895d80d00 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 20 Jan 2022 11:55:33 +1100 Subject: Cleanup: spelling in comments --- source/blender/blenlib/intern/math_base_inline.c | 16 ++++++++-------- source/blender/blenlib/intern/math_geom.c | 2 +- source/blender/blenlib/intern/timecode.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source/blender/blenlib/intern') diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 53cf2d61963..cfcc54b1136 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -398,7 +398,7 @@ MINLINE float fractf(float a) return a - floorf(a); } -/* Adapted from godot-engine math_funcs.h. */ +/* Adapted from `godot-engine` math_funcs.h. */ MINLINE float wrapf(float value, float max, float min) { float range = max - min; @@ -722,15 +722,15 @@ MINLINE int integer_digits_i(const int i) #ifdef BLI_HAVE_SSE2 -/* Calculate initial guess for arg^exp based on float representation +/** + * Calculate initial guess for `arg^exp` based on float representation * This method gives a constant bias, which can be easily compensated by * multiplying with bias_coeff. - * Gives better results for exponents near 1 (e. g. 4/5). + * Gives better results for exponents near 1 (e.g. `4/5`). * exp = exponent, encoded as uint32_t - * e2coeff = 2^(127/exponent - 127) * bias_coeff^(1/exponent), encoded as - * uint32_t + * `e2coeff = 2^(127/exponent - 127) * bias_coeff^(1/exponent)`, encoded as `uint32_t`. * - * We hope that exp and e2coeff gets properly inlined + * We hope that exp and e2coeff gets properly inlined. */ MALWAYS_INLINE __m128 _bli_math_fastpow(const int exp, const int e2coeff, const __m128 arg) { @@ -742,7 +742,7 @@ MALWAYS_INLINE __m128 _bli_math_fastpow(const int exp, const int e2coeff, const return ret; } -/* Improve x ^ 1.0f/5.0f solution with Newton-Raphson method */ +/** Improve `x ^ 1.0f/5.0f` solution with Newton-Raphson method */ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(const __m128 old_result, const __m128 x) { __m128 approx2 = _mm_mul_ps(old_result, old_result); @@ -752,7 +752,7 @@ MALWAYS_INLINE __m128 _bli_math_improve_5throot_solution(const __m128 old_result return _mm_mul_ps(summ, _mm_set1_ps(1.0f / 5.0f)); } -/* Calculate powf(x, 2.4). Working domain: 1e-10 < x < 1e+10 */ +/** Calculate `powf(x, 2.4)`. Working domain: `1e-10 < x < 1e+10`. */ MALWAYS_INLINE __m128 _bli_math_fastpow24(const __m128 arg) { /* max, avg and |avg| errors were calculated in gcc without FMA instructions diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index a155877513a..3800fc58a5b 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -3720,7 +3720,7 @@ void barycentric_weights_v2_quad(const float v1[2], /* NOTE(campbell): fabsf() here is not needed for convex quads * (and not used in #interp_weights_poly_v2). * But in the case of concave/bow-tie quads for the mask rasterizer it - * gives unreliable results without adding absf(). If this becomes an issue for more general + * gives unreliable results without adding `absf()`. If this becomes an issue for more general * usage we could have this optional or use a different function. */ #define MEAN_VALUE_HALF_TAN_V2(_area, i1, i2) \ ((_area = cross_v2v2(dirs[i1], dirs[i2])) != 0.0f ? \ diff --git a/source/blender/blenlib/intern/timecode.c b/source/blender/blenlib/intern/timecode.c index 55131fa639d..14adab8648b 100644 --- a/source/blender/blenlib/intern/timecode.c +++ b/source/blender/blenlib/intern/timecode.c @@ -49,7 +49,7 @@ size_t BLI_timecode_string_from_time(char *str, /* get cframes */ if (time < 0) { - /* correction for negative cfraues */ + /* Correction for negative cframes. */ neg[0] = '-'; time = -time; } -- cgit v1.2.3