R/to_plot_coords.R

Defines functions to_plot_coords

#' @keywords internal
#' @noRd
#'
# Convert mathematical angles to plotting angles using the chosen zero and rotation.
to_plot_coords <- function(theta, rotation, zero) {
  if (rotation == "counter") {
    (theta + zero) %% (2*pi)
  } else {
    (zero - theta) %% (2*pi)
  }
}

Try the bpDir package in your browser

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

bpDir documentation built on Nov. 9, 2026, 9:07 a.m.