Вопрос

What's the difference between a vector described with magnitude and angle and one described by x and y? Or are they the same, just expressed differently?

Это было полезно?

Решение

There is a bijection of the two representations and you can use this:

x = r*cos(alpha);
y = r*sin(alpha);

So the two representation effectively do the same. Still one is to be preferred over the other for certain tasks. For instance rotation is easier if vector is expressed using magnitude and angle. On the other hand dot product is easier to compute using coordinates x and y.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top