R/mmstat.pos.R

#' mmstat.pos
#'
#' Returns a linear interpolation based on \code{minmax}.
#'
#' @param minmax numeric(2): range to interpolate between
#' @param pos numeric: proportion(s) to interpolate, usually between zero and one
#'
#' @return interpolated values
#' @export
#'
#' @examples
#' mmstat.pos(c(0,360), 0.5)
mmstat.pos <- function (minmax, pos) {
  min(minmax)+diff(minmax)*pos
}

Try the HKRbook package in your browser

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

HKRbook documentation built on Oct. 6, 2022, 9:06 a.m.