equal

fun equal(a: Double, b: Double, precision: Double = defaultNumericalPrecision): Boolean

Compares two numbers a and b and checks if they are within the supplied precision of each other.

Return

boolean true if the relative difference between a and b is less than precision

Parameters

a

double the first number

b

double the second number

precision

double the precision for checking, default is defaultNumericalPrecision()