Skip to content

Commit 0f4da85

Browse files
committed
Fix CGRect computations
1 parent 9fc5f2b commit 0f4da85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/LayoutInspector/Geometry.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ extension CGRect {
2929
origin.y += delta.height
3030
size.width -= delta.width
3131
size.height -= delta.height
32+
self = self.standardized
3233
}
3334
}
3435

@@ -39,6 +40,7 @@ extension CGRect {
3940
origin.y += delta.height
4041
size.width += delta.width
4142
size.height -= delta.height
43+
self = self.standardized
4244
}
4345
}
4446

@@ -49,6 +51,7 @@ extension CGRect {
4951
origin.x += delta.width
5052
size.width -= delta.width
5153
size.height += delta.height
54+
self = self.standardized
5255
}
5356
}
5457

@@ -58,6 +61,7 @@ extension CGRect {
5861
let delta = newValue - CGPoint(x: maxX, y: minY)
5962
size.width += delta.width
6063
size.height += delta.height
64+
self = self.standardized
6165
}
6266
}
6367
}

0 commit comments

Comments
 (0)