diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-24 15:25:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-24 15:26:47 +0400 |
commit | 59472df8d695eaa8c7062d3006078c08fab8f3cc (patch) | |
tree | 0a53050c2e364af9871c7f941ae8055eda8ad69b /source | |
parent | 9e924c8ffed40ff1419f3321c87da725023d4708 (diff) |
Image: color grid - correct abs() use with ints
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image_gen.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index 71b4f9947a4..4f9ed5f258d 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -126,13 +126,13 @@ void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int widt for (x = 0; x < width; x++) { h = 0.125f * floorf(x / checkerwidth); - if ((fabs((x % checkerwidth) - (checkerwidth / 2)) < 4) && - (fabs((y % checkerwidth) - (checkerwidth / 2)) < 4)) + if ((abs((x % checkerwidth) - (checkerwidth / 2)) < 4) && + (abs((y % checkerwidth) - (checkerwidth / 2)) < 4)) { - if ((fabs((x % checkerwidth) - (checkerwidth / 2)) < 1) || - (fabs((y % checkerwidth) - (checkerwidth / 2)) < 1)) + if ((abs((x % checkerwidth) - (checkerwidth / 2)) < 1) || + (abs((y % checkerwidth) - (checkerwidth / 2)) < 1)) { - hsv[0] = fmodf(fabs(h - hoffs), 1.0f); + hsv[0] = fmodf(fabsf(h - hoffs), 1.0f); hsv_to_rgb_v(hsv, rgb); if (rect) { |