/* Actual */
let isWithinWithOffset = (point: Point.t, rect: Rect.t, offset: Offset.t) =>
point.x >= rect.left
- offset.left
&& point.x <= rect.right
+ offset.right
&& point.y >= rect.top
- offset.top
&& point.y <= rect.bottom
+ offset.bottom;
/* Expected */
let isWithinWithOffset = (point: Point.t, rect: Rect.t, offset: Offset.t) =>
point.x >= rect.left - offset.left
&& point.x <= rect.right + offset.right
&& point.y >= rect.top - offset.top
&& point.y <= rect.bottom + offset.bottom;
If I try to prevent line break by wrapping (rect.left - offset.left), refmt removes ().
I'll see what I can do in the second part of next week.
Most helpful comment
I'll see what I can do in the second part of next week.