File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments