R/rectToPolar.R

Defines functions rectToPolar

Documented in rectToPolar

rectToPolar = function(x,y){

	r = sqrt(x^2+y^2)
	theta = atan2(y,x)
	theta = ifelse(theta<0, theta+2*pi, theta)
	return(cbind(r,theta))

}

Try the BayesBD package in your browser

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

BayesBD documentation built on May 1, 2019, 10:17 p.m.