Consider this craziness when setting up projection or something similar:
Vector2i framebufferSize;
Float aspectRatio = Float(framebufferSize.x())/framebufferSize.y();
And now, behold, the convenience:
Float aspectRatio = Vector2(framebufferSize).aspectRatio();
Also fixed unary RectangularMatrix::operator-() and Vector::operator-()
documentation (was stating that the operation is done in-place, which is
impossible.
* Merged constExpressions() into other test cases, simplified the test
a lot and removing duplicate code.
* Fixed Vector3::xy(), Vector3::xy() and Vector3::xyz() constexpr
overloads, they now return copy instead of reinterpret_cast
reference. The copy is const to make constexpr operations working
even on returned subclass, e.g.:
constexpr Vector4 a;
constexpr Float b = a.xyz().y();
Removing of another <*stream> #include leads to more compilation time
saving, now from ~5:12 to ~4:55. Another compilation time improvements
will now be possible only by using Clang's modules, I don't know where
to optimize further (except for getting rid of <sstream> in tests).
Now we can use CORRADE_COMPARE() almost exclusively for comparing
Vector, Matrix instances and all containers from STL. Tests running time
for all 31 tests is now around 0.1 sec instead of two seconds like
before.
Disabled compilation of all benchmarks, because TestSuite cannot handle
them yet.
PKGBUILD from AUR now can shamelessly use check() function without
unnecessary dependencies.
Long-standing TODO. It is better to have size first, because it is more
significant than type (e.g. because there are Vector4<T> specializations
and not VectorT<4> specializations). It is also IMHO easier for user to
distinguish/read the type than before:
Vector<float, 4> -> Vector4<float> // before
Vector<4, float> -> Vector4<float> // now