Skip to content

Commit 88849c6

Browse files
committed
Fix warnings
1 parent 5ed29a4 commit 88849c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ShadowView/ShadowView/UIImageEffects.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ public extension UIImage {
152152
return nil
153153
}
154154
if maskImage != nil && maskImage!.cgImage == nil {
155-
print("*** error: maskImage must be backed by a CGImage: \(maskImage)")
155+
print("*** error: maskImage must be backed by a CGImage: \(String(describing: maskImage))")
156156
return nil
157157
}
158158

159-
let __FLT_EPSILON__ = CGFloat(FLT_EPSILON)
159+
let __FLT_EPSILON__ = CGFloat(Float.ulpOfOne)
160160
let screenScale = UIScreen.main.scale
161161
let imageRect = CGRect(origin: CGPoint.zero, size: size)
162162
var effectImage = self
@@ -205,7 +205,7 @@ public extension UIImage {
205205
//
206206

207207
let inputRadius = blurRadius * screenScale
208-
let d = floor(inputRadius * 3.0 * CGFloat(sqrt(2 * M_PI) / 4 + 0.5))
208+
let d = floor(inputRadius * 3.0 * CGFloat(sqrt(2 * .pi) / 4 + 0.5))
209209
var radius = UInt32(d)
210210
if radius % 2 != 1 {
211211
radius += 1 // force radius to be odd so that the three box-blur methodology works.

0 commit comments

Comments
 (0)