Vec.toPolar

Converts this 2-dimensional vector from Cartesian to Polar coordinates. It is assumed that the first element is the **x** coordinate, and the second element is the **y** coordinate. The first element becomes the **radius** and the second becomes the angle **theta**. - The angle is normalized to be within the range [0, 2*PI).

struct Vec(T, size_t size)
ref @nogc
static if(isFloatingPoint!T && size == 2)
Vec!(T, size)
toPolar
()
if (
isNumeric!T &&
size > 0
)

Return Value

Type: Vec!(T, size)

A reference to this vector.

Meta