Trying to threshold compare floats; Is there a sta...
# announcements
a
Trying to threshold compare floats; Is there a standard extension for this?
l
I don't think so. You want to set a precision and have 0.996 and 1.014 be treated as equals if the precision is 0.01 ?
a
Yep. It’s simple to do manually but Kotlin keeps surprising me with hidden extension functions 😄. Though checked around there’s probably not one. I know Guava has fuzzyEquals for example.