Login

//ERDDAP/com.cohort.util/ScriptMath2/almost0

almost0

[JVM]
fun almost0(d: Double): Boolean

This quickly tests if d is almost 0 (Math.abs(d)<dEps).

  • If you are working with small numbers, this test may be inappropriate.
  • This is very fast, since it only involves one comparison.
  • Use almost0(d) instead of almostEqual5 or almostEqual9.

Return

true if Math.abs(d) <dEps. NaN and Infinity correctly return false.

Parameters

JVM

dany double