commonMain.krono.utils.equality.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of krono-api-jvm Show documentation
Show all versions of krono-api-jvm Show documentation
An multiplatform interoperable datetime library
The newest version!
package krono.utils
import kotlin.math.abs
fun equals(lhs: Double, rhs: Double, tolerance: Double = 0.001) = abs(rhs - lhs) <= tolerance