I'm trying to use kotlin.math.abs in a util.kt file, but the following code results in an "unused import" warning on the import statement and an unresolved reference where I use abs in the code.
import kotlin.math.abs
fun fuzzyEquals(a: Double, b:Double, epsilon: Double= 0.001) = abs(a-b) < epsilon
I'm using IntelliJ and gradle to organize the project. I'm on Intellij 2018.2.5 with Kotlin 1.3.0.
The folling code does work, so I don't think it's a problem with Kotlin as a whole
import kotlin.sequences.find
fun test() = listOf(1,2).find{it==1}