Learn R Programming

treecm (version 1.2.2)

toPolar: Converts cartesian (x, y) into polar (angle, distance) coordinates

Description

Converts cartesian coordinates ($x$, $y$) into polar (angle, distance) ones, assuming (0, 0) as origin of axes and, incidentally, the position of tree base

Usage

toPolar(x, y)

Arguments

x
Abscissa coordinate
y
Ordinate coordinate

Value

A vector holding angle in degrees and distance in the same unit as $x$ and $y$