Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert code from Objective-C to Swift

I've got this line of code in Objective-C and I absolutely need to "translate it" to Swift.

BOOL hasBlur = blurRadius > __FLT_EPSILON__

Unfortunately I get this error:

Use of unresolved identifier __FLT_EPSILON_

Can you help me? Thanks

like image 692
Sara Canducci Avatar asked May 16 '26 06:05

Sara Canducci


1 Answers

For swift 3.1 OR above

CGFloat.ulpOfOne

OR

Double.ulpOfOne
like image 82
Hiren Panchal Avatar answered May 19 '26 03:05

Hiren Panchal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!