% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper_functions.R
\name{minmax0_smooth}
\alias{minmax0_smooth}
\alias{max0_smooth}
\alias{min0_smooth}
\title{Smooth approximations to max(x, 0) and min(x, 0)}
\usage{
max0_smooth(x, rho = 20)

min0_smooth(x, rho = 20)
}
\arguments{
\item{x}{a vector of values}

\item{rho}{smoothing parameter, larger values lead to closer approximation}
}
\value{
the approximate maximum or minimum of x and 0
}
\description{
Smooth approximations to max(x, 0) and min(x, 0)
}
\examples{
x <- seq(-1, 1, by = 0.1)
min0_smooth(x)
max0_smooth(x)
}
