Math vectors lib with arithmetic operations for 2 and 4 elements
Beside the example below, you may want to check test files in the tests directory.
oo::vec2<float> f1{2.F, 3.F};
oo::vec2<float> f2{5.F};
auto a = f1 + f2;
auto s = f1 - f2;
auto m = f1 * f2;
auto d = f1 / f2;
oo::vec4<float> f1{2.F, 3.F, 4.F, 5.F};
oo::vec4<float> f2{5.F};
auto a = f1 + f2;
auto s = f1 - f2;
auto m = f1 * f2;
auto d = f1 / f2;
This library requires a C++17 compiler and standard library.