% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{safe_max}
\alias{safe_max}
\title{Internal: safe maximum (NA-robust)}
\usage{
safe_max(x)
}
\arguments{
\item{x}{Numeric vector.}
}
\value{
Numeric scalar maximum, or \code{NA_real_}.
}
\description{
Returns \code{max(x, na.rm = TRUE)}. If all values are \code{NA}, returns
\code{NA_real_}.
}
\keyword{internal}
