Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top