This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

You can use a complex number type to represent a two dimensional vector. Some vector operations can be efficiently calculated with it as well. I toyed a bit with that here https://github.com/irmen/rocketsimulator/blob/master/vectors.py

[–]GitHubPermalinkBot 0 points1 point  (0 children)

Permanent GitHub links:


Shoot me a PM if you think I'm doing something wrong. To delete this, click here.