Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 941406e

Browse files
committed
Fix clang warning by using fabs to compare floats
1 parent 57fa73f commit 941406e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_image_resample.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,8 @@ void resample(
908908

909909
if (params.interpolation != NEAREST &&
910910
params.is_affine &&
911-
abs(params.affine.sx) == 1.0 &&
912-
abs(params.affine.sy) == 1.0 &&
911+
fabs(params.affine.sx) == 1.0 &&
912+
fabs(params.affine.sy) == 1.0 &&
913913
params.affine.shx == 0.0 &&
914914
params.affine.shy == 0.0) {
915915
params.interpolation = NEAREST;

0 commit comments

Comments
 (0)