diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-18 16:35:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-18 16:37:58 +0300 |
commit | 29039e5c7457c2061787d3f22dce27afcae25c71 (patch) | |
tree | da06fbbb37c18697b0317ca024cd2191bfcece3e /source/blender/editors/sculpt_paint/paint_image_2d.c | |
parent | 606f3c74d36bbbe6b7e3aeae962176a89355a552 (diff) |
Cleanup: remove compare_len_squared utility
There isn't any advantage to this over comparing the squared length.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_image_2d.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_2d.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c index 990017d3a20..cad75efbf56 100644 --- a/source/blender/editors/sculpt_paint/paint_image_2d.c +++ b/source/blender/editors/sculpt_paint/paint_image_2d.c @@ -1415,7 +1415,7 @@ static void paint_2d_fill_add_pixel_byte( rgba_uchar_to_float(color_f, color_b); straight_to_premul_v4(color_f); - if (compare_len_squared_v4v4(color_f, color, threshold_sq)) { + if (len_squared_v4v4(color_f, color) <= threshold_sq) { BLI_stack_push(stack, &coordinate); } BLI_BITMAP_SET(touched, coordinate, true); @@ -1434,7 +1434,7 @@ static void paint_2d_fill_add_pixel_float( coordinate = ((size_t)y_px) * ibuf->x + x_px; if (!BLI_BITMAP_TEST(touched, coordinate)) { - if (compare_len_squared_v4v4(ibuf->rect_float + 4 * coordinate, color, threshold_sq)) { + if (len_squared_v4v4(ibuf->rect_float + 4 * coordinate, color) <= threshold_sq) { BLI_stack_push(stack, &coordinate); } BLI_BITMAP_SET(touched, coordinate, true); |