メインコンテンツへスキップ

//ERDDAP/com.cohort.util/ScriptMath2/roundToByte

roundToByte

[JVM]
fun roundToByte(d: Double): Byte

Safely rounds a double to a byte.

Return

Byte.MAX_VALUE 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.

Parameters

JVM

dany double