diff options
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 85636d23f6f..512086f0e17 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -463,14 +463,14 @@ int constrain_rgb(float *r, float *g, float *b) float w; /* Amount of white needed is w = - min(0, *r, *g, *b) */ - + w = (0 < *r) ? 0 : *r; w = (w < *g) ? w : *g; w = (w < *b) ? w : *b; w = -w; /* Add just enough white to make r, g, b all positive. */ - + if (w > 0) { *r += w; *g += w; *b += w; return 1; /* Color modified to fit RGB gamut */ |