https://github.com/cran/pracma
Raw File
Tip revision: c79a04b5074656b36e591191eb8137b70a349932 authored by Hans W. Borchers on 30 June 2014, 00:00:00 UTC
version 1.7.0
Tip revision: c79a04b
deg2rad.R
##
##  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) )
}
back to top