diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 03:31:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-04 03:31:51 +0300 |
commit | 38ed95fe8d6f4c47c0c5f09ffecc987d75150dcc (patch) | |
tree | 8884ecd983657941c1375d61fdeb74dd4dabe43a /source/blender/python/mathutils/mathutils_Color.c | |
parent | 89b10b8d423a0ee851d9299af279ab93660f15f4 (diff) |
Cleanup: replace CLAMP macros with functions
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Color.c')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Color.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index 59bddf01cae..bf7fe0472d0 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -824,10 +824,7 @@ static int Color_hsv_set(ColorObject *self, PyObject *value, void *UNUSED(closur return -1; } - CLAMP(hsv[0], 0.0f, 1.0f); - CLAMP(hsv[1], 0.0f, 1.0f); - CLAMP(hsv[2], 0.0f, 1.0f); - + clamp_v3(hsv, 0.0f, 1.0f); hsv_to_rgb_v(hsv, self->col); if (BaseMath_WriteCallback(self) == -1) { |