diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-27 21:41:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-27 21:41:10 +0400 |
commit | 1fe4a273053abaa22a7d4b8af2475f1a05728b47 (patch) | |
tree | bb4656e352ef9f7e7de2e36041a9ecfda762197f /source/blender/blenlib/intern/math_color_blend_inline.c | |
parent | 6a04ff11afe5e59b29169e2466152028a9d8e904 (diff) |
quiet warning, color blend c file was missing own include, also minor style tweaks.
Diffstat (limited to 'source/blender/blenlib/intern/math_color_blend_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color_blend_inline.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/math_color_blend_inline.c b/source/blender/blenlib/intern/math_color_blend_inline.c index 876ed6acf07..ccc9f355d57 100644 --- a/source/blender/blenlib/intern/math_color_blend_inline.c +++ b/source/blender/blenlib/intern/math_color_blend_inline.c @@ -23,13 +23,13 @@ * ***** END GPL LICENSE BLOCK ***** * */ -/** \file blender/blenlib/intern/math_color_inline.c +/** \file blender/blenlib/intern/math_color_blend_inline.c * \ingroup bli */ - #include "BLI_math_base.h" #include "BLI_math_color.h" +#include "BLI_math_color_blend.h" #include "BLI_utildefines.h" #ifndef __MATH_COLOR_BLEND_INLINE_C__ @@ -329,7 +329,7 @@ MINLINE void blend_color_lighten_float(float dst[4], const float src1[4], const * src1 and src2, then blend it with src1 */ const float t = src2[3]; const float mt = 1.0f - t; - const float map_alpha = src1[3]/src2[3]; + const float map_alpha = src1[3] / src2[3]; dst[0] = mt * src1[0] + t * max_ff(src1[0], src2[0] * map_alpha); dst[1] = mt * src1[1] + t * max_ff(src1[1], src2[1] * map_alpha); @@ -373,7 +373,7 @@ MINLINE void blend_color_erase_alpha_float(float dst[4], const float src1[4], co if (src2[3] != 0.0f && src1[3] > 0.0f) { /* subtract alpha and remap RGB channels to match */ const float alpha = max_ff(src1[3] - src2[3], 0.0f); - const float map_alpha = alpha/src1[3]; + const float map_alpha = alpha / src1[3]; dst[0] *= map_alpha; dst[1] *= map_alpha; @@ -394,7 +394,7 @@ MINLINE void blend_color_add_alpha_float(float dst[4], const float src1[4], cons if (src2[3] != 0.0f && src1[3] < 1.0f) { /* add alpha and remap RGB channels to match */ const float alpha = min_ff(src1[3] + src2[3], 1.0f); - const float map_alpha = (src1[3] > 0.0f) ? alpha/src1[3] : 1.0f; + const float map_alpha = (src1[3] > 0.0f) ? alpha / src1[3] : 1.0f; dst[0] *= map_alpha; dst[1] *= map_alpha; |