R/polar2cart.r

Defines functions polar2cart

Documented in polar2cart

polar2cart <-
function (x, y, dist, bearing, as.deg = FALSE) 
{
    if (as.deg) {
        bearing = bearing * pi/180
    }
    newx <- x + dist * sin(bearing)
    newy <- y + dist * cos(bearing)
    return(list(x = newx, y = newy))
}

Try the FREddyPro package in your browser

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

FREddyPro documentation built on May 29, 2017, 7:22 p.m.