#' Potential Function for Hard Sphere
#'
#' @param r distance from center
#' @param sig sigma, size of sphere
#' @keywords hardsphere
#' @export
#' @examples
#' hardsphere(0.5, 1.0)
#' hardsphere(1.5, 1.0)
hardsphere <- function(r, sig) {
if (r < sig) {
Inf
} else {
0
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.