cartesian2polar.Rd
Cartesian to polar coordinate conversion.
cartesian2polar(x, y = NULL)
x | x coordinate (or a vector of length 2 holding \(x, y\)) |
---|---|
y | y coordinate |
A list of the \(r\) and \(phi\) polar coordinates.
cartesian2polar(0, 0)#> $r #> [1] 0 #> #> $phi #> [1] 0 #>cartesian2polar(1, 2)#> $r #> [1] 2.236068 #> #> $phi #> [1] 1.107149 #>#> $r #> [1] 2.236068 #> #> $phi #> [1] 1.107149 #>