//ERDDAP/com.cohort.util/ScriptMath2/roundToDouble
roundToDouble
[JVM]
fun roundToDouble(d: Double): Double
Safely rounds a double to the nearest integer (stored as a double).
Return
Double.NaN if d is !finite; otherwise d, rounded to the nearest int. Undesirable: d.5 rounds up for positive numbers, down for negative. But this rounds d.5 in a way that is often more useful than Math.rint (which rounds to nearest even number).
Parameters
JVM
d | any double |