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>2014-02-24 15:25:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-24 15:26:47 +0400
commit59472df8d695eaa8c7062d3006078c08fab8f3cc (patch)
tree0a53050c2e364af9871c7f941ae8055eda8ad69b /source/blender/blenkernel/intern/image_gen.c
parent9e924c8ffed40ff1419f3321c87da725023d4708 (diff)
Image: color grid - correct abs() use with ints
Diffstat (limited to 'source/blender/blenkernel/intern/image_gen.c')
-rw-r--r--source/blender/blenkernel/intern/image_gen.c10
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) {