isEqual

fun isEqual(a: Float, b: Float): Boolean

Returns true if a is nearly equal to b. The function uses the default floating error tolerance.

Parameters

a

the first value.

b

the second value.


fun isEqual(a: Float, b: Float, tolerance: Float): Boolean

Returns true if a is nearly equal to b.

Parameters

a

the first value.

b

the second value.

tolerance

represent an upper bound below which the two values are considered equal.