//ERDDAP/com.cohort.util/ScriptMath2/minMaxDef
minMaxDef
[JVM]
fun minMaxDef(min: Int, max: Int, def: Int, current: Int): Int
This forces an int into a range defined by min..max.
Return
def if current is less than min; or def if current is greater than max; else it returns the current value.
Parameters
JVM
min | the minimum allowed value |
max | the maximum allowed value |
def | the default value |
current | the current value |
[JVM]
fun minMaxDef(min: Double, max: Double, def: Double, current: Double): Double
This forces a double into a range defined by min..max.
Return
def if current is less than min; or def if current is greater than max; else it returns the current value.
Parameters
JVM
min | the minimum allowed value |
max | the maximum allowed value |
def | the default value |
current | the current value |