Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-03-22 12:30:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-22 12:30:00 +0300
commit1e9bf0cfdb6c925b28af6f0330467e7d9d798c05 (patch)
treec8356d8bc812dc6e3f23b9c381e94ec4c9d4c879 /source/blender/blenlib/intern/math_color.c
parent9b2dd9aac65aa49c05176bb8b7aabde9fe1aeeac (diff)
spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r--source/blender/blenlib/intern/math_color.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 633585a3336..a1bb2754d95 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -365,21 +365,21 @@ int constrain_rgb(float *r, float *g, float *b)
{
float w;
- /* Amount of white needed is w = - min(0, *r, *g, *b) */
+ /* 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;
+ 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. */
+ /* 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 */
- }
+ if (w > 0) {
+ *r += w; *g += w; *b += w;
+ return 1; /* Color modified to fit RGB gamut */
+ }
- return 0; /* Color within RGB gamut */
+ return 0; /* Color within RGB gamut */
}
float rgb_to_grayscale(float rgb[3])