I am looking for a Java library or package that I can use to work with 2D vectors of the direction & magnitude variety, and can easily convert between Cartesian coordinates (x, y) and polar (angle & distance; aka direction & magnitude).
Specifically, I need to be able to add, subtract, and multiply vectors. I need to be able to take an x and y coordinate and get the angle and distance from the origin (0,0).
The specific use will be in a physics game, used to deal with elastic and inelastic collisions. I'm confident that code has already been written to do these things, but I am unsure what to google to find what I need. If all else fails, I could try to write it myself, but I'd rather use something that's already been written. If there is a game library that includes this sort of physics functionality, that might be even better.