diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-05 08:23:34 +0300 |
commit | 17e1e2bfd8dfbd6f6fc42cc305e93393342020f7 (patch) | |
tree | 8a164422f7eb7d3aa9f7473c19c80da535c29a05 /intern/cycles/util | |
parent | b62b923f544fa1df0aecd56f3568dd5185601306 (diff) |
Cleanup: correct spelling in comments
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_math.h | 6 | ||||
-rw-r--r-- | intern/cycles/util/util_math_fast.h | 4 | ||||
-rw-r--r-- | intern/cycles/util/util_math_matrix.h | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_md5.h | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_stack_allocator.h | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_string.h | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index 8caabf6eac3..ad04340231e 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -349,7 +349,7 @@ ccl_device_inline float fractf(float x) return x - floorf(x); } -/* Adapted from godotengine math_funcs.h. */ +/* Adapted from godot-engine math_funcs.h. */ ccl_device_inline float wrapf(float value, float max, float min) { float range = max - min; @@ -385,7 +385,7 @@ ccl_device_inline float nonzerof(float f, float eps) return f; } -/* Signum function testing for zero. Matches GLSL and OSL functions. */ +/* `signum` function testing for zero. Matches GLSL and OSL functions. */ ccl_device_inline float compatible_signf(float f) { if (f == 0.0f) { @@ -754,7 +754,7 @@ ccl_device_inline float2 map_to_sphere(const float3 co) float u, v; if (l > 0.0f) { if (UNLIKELY(co.x == 0.0f && co.y == 0.0f)) { - u = 0.0f; /* othwise domain error */ + u = 0.0f; /* Otherwise domain error. */ } else { u = (1.0f - atan2f(co.x, co.y) / M_PI_F) / 2.0f; diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h index 07b0878e3d5..107b36ce6cd 100644 --- a/intern/cycles/util/util_math_fast.h +++ b/intern/cycles/util/util_math_fast.h @@ -84,7 +84,7 @@ ccl_device_inline int fast_rint(float x) { /* used by sin/cos/tan range reduction. */ #ifdef __KERNEL_SSE4__ - /* Single roundps instruction on SSE4.1+ (for gcc/clang at least). */ + /* Single `roundps` instruction on SSE4.1+ (for gcc/clang at least). */ return float_to_int(rintf(x)); #else /* emulate rounding by adding/subtracting 0.5. */ @@ -613,7 +613,7 @@ ccl_device_inline float fast_erfcf(float x) ccl_device_inline float fast_ierff(float x) { - /* From: Approximating the erfinv function by Mike Giles. */ + /* From: Approximating the `erfinv` function by Mike Giles. */ /* To avoid trouble at the limit, clamp input to 1-eps. */ float a = fabsf(x); if (a > 0.99999994f) { diff --git a/intern/cycles/util/util_math_matrix.h b/intern/cycles/util/util_math_matrix.h index 1dc661a7aa7..123736f75a6 100644 --- a/intern/cycles/util/util_math_matrix.h +++ b/intern/cycles/util/util_math_matrix.h @@ -161,7 +161,7 @@ ccl_device_inline void math_trimatrix_add_gramian(ccl_global float *A, } } -/* Transpose matrix A inplace. */ +/* Transpose matrix A in place. */ ccl_device_inline void math_matrix_transpose(ccl_global float *A, int n, int stride) { for (int i = 0; i < n; i++) { diff --git a/intern/cycles/util/util_md5.h b/intern/cycles/util/util_md5.h index 4622945f9d2..3102a0f4bad 100644 --- a/intern/cycles/util/util_md5.h +++ b/intern/cycles/util/util_md5.h @@ -49,7 +49,7 @@ class MD5Hash { void process(const uint8_t *data); void finish(uint8_t digest[16]); - uint32_t count[2]; /* message length in bits, lsw first */ + uint32_t count[2]; /* message length in bits, LSW first. */ uint32_t abcd[4]; /* digest buffer */ uint8_t buf[64]; /* accumulate block */ }; diff --git a/intern/cycles/util/util_stack_allocator.h b/intern/cycles/util/util_stack_allocator.h index 36db655e5eb..ef31c0fe5e2 100644 --- a/intern/cycles/util/util_stack_allocator.h +++ b/intern/cycles/util/util_stack_allocator.h @@ -126,7 +126,7 @@ template<int SIZE, typename T> class ccl_try_align(16) StackAllocator return size_t(-1); } - /* Rebind to other ype of allocator. */ + /* Rebind to other type of allocator. */ template<class U> struct rebind { typedef StackAllocator<SIZE, U> other; diff --git a/intern/cycles/util/util_string.h b/intern/cycles/util/util_string.h index f51aa7111e8..6b6f493bd94 100644 --- a/intern/cycles/util/util_string.h +++ b/intern/cycles/util/util_string.h @@ -66,9 +66,9 @@ string string_from_wstring(const wstring &path); string string_to_ansi(const string &str); #endif -/* Make a string from a size in bytes in human readable form */ +/* Make a string from a size in bytes in human readable form. */ string string_human_readable_size(size_t size); -/* Make a string from a unitless quantity in human readable form */ +/* Make a string from a unit-less quantity in human readable form. */ string string_human_readable_number(size_t num); CCL_NAMESPACE_END |