Closed chooyan-eng closed 9 months ago
dx and dy of bottomRight sometimes exceed the image.width and image.height slightly, such like 640.00004 when the image size is 640, and causes InvalidRectError.
dx
dy
bottomRight
image.width
image.height
640.00004
640
InvalidRectError
This fix includes 2 enhancements below.
double
int
.negative
< 0
This PR fixes #142
Hey! I am facing the same issue for topLeft. Getting topLeft.dy.isNegative = -5.211189645992988e-13 which must be a floating point error
dx
anddy
ofbottomRight
sometimes exceed theimage.width
andimage.height
slightly, such like640.00004
when the image size is640
, and causesInvalidRectError
.This fix includes 2 enhancements below.
double
toint
..negative
rather than< 0
This PR fixes #142