I'm trying to use Ruby's vector class in a game I'm working on, but I'd like to be able to create vectors by specifying the direction and magnitude of the vector rather than the position of the endpoint. The only way I know of to make a vector is to write something like Vector[x, y] but this doesn't quite work for what I'm trying to do.
Does anyone know a simple way to initialise a vector with direction and magnitude?