Simple vector math library for SFML. It uses the built-in vector types and puts its functions in the sf
namespace to keep the usage as natural and SFML-like as possible.
- Vecotor addition
- Vector subtraction
- Scalar multiplication
- Dot product
- Length of vector
- Normalize vector
- Invert vector
- Angle between two vectors (in degrees)
- Angle of the vectors direction depending on the unit circle (in degrees)
- Rotate vector
- Vector projection on axis
- Vector reflection on normal
- Normal on vector between two points
- Square function
- Radians and Degrees conversions
See the wiki for further instructions and a full documentation of every function.
Or look at the actual project Pong to see further usages of this library.