Pygame Vector2.as_polar() and Vector2.from_polar() methods

Viewed 2373

Can someone please show me an example of using Vector2.as_polar() to get the distance and azimuthal angle, and then plugging that information back into Vector2.from_polar() to get the cartesian coordinates?

Let's suppose we want the distance and azimuthal angle between (0, 0) and (15, 10), and then plug that information into Vector2.from_polar() to generate (15, 10) again.

I would explain exactly what I am doing, but it might be easier for me and everyone else to just see a working example.

1 Answers
Related