% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim-utils.R
\name{clip_prob}
\alias{clip_prob}
\title{Clamp probabilities away from 0 and 1}
\usage{
clip_prob(p, eps = 1e-12)
}
\arguments{
\item{p}{Numeric vector or matrix of probabilities.}

\item{eps}{Small positive value (default \code{1e-12}).}
}
\value{
Numeric vector or matrix with the same dimensions as \code{p}.
}
\description{
Ensures all values lie in \eqn{[eps, 1-eps]} to avoid \code{log(0)}
or division-by-zero issues in downstream computations.
}
\keyword{internal}
