% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MortalityLaw_main.R
\name{scale_x}
\alias{scale_x}
\title{Scale the age vector for stable optimisation}
\usage{
scale_x(x)
}
\arguments{
\item{x}{A numeric vector of ages.}
}
\value{
A numeric vector of scaled ages, where min(x) == 1.
}
\description{
For mortality laws that cover only a portion of the lifespan (e.g., adult
or old-age mortality), the age vector is rescaled so that the minimum age
becomes 1. This improves numerical stability by keeping the exponentiated
terms in the hazard function within a reasonable range.
}
\keyword{internal}
