cart2pol: cart2pol converts cartesian coordinates into the polar angle

View source: R/rutils.R

cart2polR Documentation

cart2pol converts cartesian coordinates into the polar angle

Description

cart2pol as a step in converting cartesian coordinates into polar coordinates this calculates the angle, in degrees, from x y values

Usage

cart2pol(x)

Arguments

x

either a vector of two values of a matrix of pairs of values

Value

a single angle of vector of angles

Examples

## Not run: 
  cart2pol(c(3,3))  # should be 45
  dat <- matrix(c(3,4,5,7),nrow=2,ncol=2,byrow=TRUE)
  print(dat)
  cart2pol(dat)     # should be 36.8699 twice.

## End(Not run)

haddonm/rutilsMH documentation built on July 21, 2023, 8:46 p.m.