R/deg2rad.R

Defines functions rad2deg deg2rad

Documented in deg2rad rad2deg

##
##  d e g 2 r a d . R  Angle Conversion
##


deg2rad <- function(deg) {
    stopifnot(is.numeric(deg))
    ( rad <- (pi/180)*deg )
}


rad2deg <- function(rad) {
    stopifnot(is.numeric(rad))
    ( deg <- rad/(pi/180) )
}

Try the pracma package in your browser

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

pracma documentation built on March 19, 2024, 3:05 a.m.