//ERDDAP/com.cohort.util/ScriptMath2/roundToUByte
roundToUByte
[JVM]
fun roundToUByte(d: Double): Short
Safely rounds a double to a ubyte.
Return
255 if d is too small, too big, or NaN; otherwise d, rounded to the nearest byte. Undesirable: d.5 rounds up for positive numbers, down for negative.