Last active
March 21, 2016 13:10
-
-
Save bittz/29c7c0f2c059f0f8c198 to your computer and use it in GitHub Desktop.
Square CGSize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CoreGraphics | |
extension CGSize { | |
public init(side: CGFloat) { | |
width = side | |
height = side | |
} | |
public init(side: Double) { | |
width = CGFloat(side) | |
height = CGFloat(side) | |
} | |
public init(side: Int) { | |
width = CGFloat(side) | |
height = CGFloat(side) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment