Added center property to CGFloat
This commit is contained in:
parent
d3f027ef6b
commit
ce3cfdbfdc
|
@ -8,7 +8,15 @@
|
|||
|
||||
import UIKit
|
||||
|
||||
extension CGFloat {
|
||||
/// EZSwiftExtensions
|
||||
public var center: CGFloat { return (self / 2) }
|
||||
}
|
||||
|
||||
/// EZSwiftExtensions
|
||||
public func degreesToRadians (angle: CGFloat) -> CGFloat {
|
||||
return (CGFloat (M_PI) * angle) / 180.0
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue