diff options
author | Stefan Werner <stefan.werner@tangent-animation.com> | 2021-08-02 10:28:54 +0300 |
---|---|---|
committer | Stefan Werner <stefan.werner@tangent-animation.com> | 2021-08-02 10:28:54 +0300 |
commit | 34e8d79c3edbc58fd242cec0c1f2bed4e43855af (patch) | |
tree | 36c70e63515af2bd8ea840102493028faec37971 /source/blender/blenlib/intern/math_base_inline.c | |
parent | 465fb31ed275618ec71e4925ab94bd4a9b077a12 (diff) | |
parent | 48722e8971133dbe14ecc6825a2451637df77eab (diff) |
Merge branch 'master' into cycles_texture_cache
Diffstat (limited to 'source/blender/blenlib/intern/math_base_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_base_inline.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 58b109eca10..6e3846e59c6 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -410,7 +410,7 @@ MINLINE float pingpongf(float value, float scale) return fabsf(fractf((value - scale) / (scale * 2.0f)) * scale * 2.0f - scale); } -// Square. +/* Square. */ MINLINE int square_s(short a) { @@ -442,7 +442,7 @@ MINLINE double square_d(double a) return a * a; } -// Cube. +/* Cube. */ MINLINE int cube_s(short a) { @@ -474,7 +474,7 @@ MINLINE double cube_d(double a) return a * a * a; } -// Min/max +/* Min/max */ MINLINE float min_ff(float a, float b) { @@ -807,9 +807,9 @@ MINLINE unsigned char unit_float_to_uchar_clamp(float val) MINLINE unsigned short unit_float_to_ushort_clamp(float val) { - return (unsigned short)((val >= 1.0f - 0.5f / 65535) ? - 65535 : - (val <= 0.0f) ? 0 : (val * 65535.0f + 0.5f)); + return (unsigned short)((val >= 1.0f - 0.5f / 65535) ? 65535 : + (val <= 0.0f) ? 0 : + (val * 65535.0f + 0.5f)); } #define unit_float_to_ushort_clamp(val) \ ((CHECK_TYPE_INLINE(val, float)), unit_float_to_ushort_clamp(val)) |