R/mdmb_squeeze_double.R

Defines functions mdmb_squeeze_double

## File Name: mdmb_squeeze_double.R
## File Version: 0.02

mdmb_squeeze_double <- function(val, min=-Inf, max=Inf)
{
    if( val > max ){
        val <- max
    } else {
        if (val < min){
            val <- min
        }
    }
    return(val)
}

Try the mdmb package in your browser

Any scripts or data that you put into this service are public.

mdmb documentation built on March 7, 2023, 6:58 p.m.