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>2012-06-13 21:23:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-13 21:23:44 +0400
commit50493317558eac2f4d15e5f5cbf86bb48f957b17 (patch)
tree7e11c501951475cb3b8c6e1922df4e1d58acd680 /source/blender/blenlib/intern/math_color.c
parent7818b94016040a3eca2b5e329600fd39d80befff (diff)
style cleanup
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r--source/blender/blenlib/intern/math_color.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index c32f981396d..b93597bf107 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -381,15 +381,9 @@ unsigned int rgb_to_cpack(float r, float g, float b)
void cpack_to_rgb(unsigned int col, float *r, float *g, float *b)
{
-
- *r = (float)((col) & 0xFF);
- *r /= 255.0f;
-
- *g = (float)(((col) >> 8) & 0xFF);
- *g /= 255.0f;
-
- *b = (float)(((col) >> 16) & 0xFF);
- *b /= 255.0f;
+ *r = ((float)(((col) ) & 0xFF)) * (1.0f / 255.0f);
+ *g = ((float)(((col) >> 8) & 0xFF)) * (1.0f / 255.0f);
+ *b = ((float)(((col) >> 16) & 0xFF)) * (1.0f / 255.0f);
}
void rgb_uchar_to_float(float col_r[3], const unsigned char col_ub[3])