Vec2D – a simple 2D math vector class

Vec2D

Vec2D is a simple C++ class I created for working with two-dimensional mathematical vectors.

Nothing fancy – the class simply provides several methods to create, edit and work with vectors, including basic scalar operations (adding, subtracting, multiplying and dividing a scalar value component-wise), operations with other 2D vectors, rotation, normalizing and the dot-product.

The class is nothing but a simple tool that might help you if you need to work with 2D vectors if you don’t feel like implementing a class like that on your own.

It is licensed under LGPL so please feel free to use and modify the code in any way you like. The class is being updated and extended from time to time!

Download the class:

You can download the class from tinytall studios public repository page:

http://hg.dev.tinytall.de/Vec2D/summary

If you would like to contribute to this project, please write me a mail or leave a comment! If you like this class please consider a donation! It would help me a lot!

Leave a Reply

Your email address will not be published. Required fields are marked *