Move off of internal SDK, copy webkit spis from opensource
This commit is contained in:
@@ -33,14 +33,14 @@ extension CGRect
|
||||
|
||||
public func centeredY(inRect: CGRect) -> CGRect {
|
||||
var rect = self
|
||||
rect.origin.y = CGRound(inRect.origin.y + (inRect.height - rect.height) / 2.0)
|
||||
rect.origin.y = (inRect.origin.y + (inRect.height - rect.height) / 2.0).rounded()
|
||||
|
||||
return rect
|
||||
}
|
||||
|
||||
public func centeredX(inRect: CGRect) -> CGRect {
|
||||
var rect = self
|
||||
rect.origin.x = CGRound(inRect.origin.x + (inRect.width - rect.width) / 2.0)
|
||||
rect.origin.x = (inRect.origin.x + (inRect.width - rect.width) / 2.0).rounded()
|
||||
|
||||
return rect
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user