Cleanup: replace CLAMP macros with functions

This commit is contained in:
2020-03-04 11:31:51 +11:00
parent 89b10b8d42
commit 38ed95fe8d
10 changed files with 12 additions and 35 deletions

View File

@@ -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) {