Vladimír Vondruš
59808c364e
Math: minor test code reorganization.
13 years ago
Vladimír Vondruš
bd00adc437
Math: test copy construction from base classes.
...
Copy construction from the same class should just work.
13 years ago
Vladimír Vondruš
7427292173
Math: test "implicitness" of value constructors.
13 years ago
Vladimír Vondruš
8669907346
Math: merge constexpr test of BoolVector into other test cases.
13 years ago
Vladimír Vondruš
20dcab0c88
Math: added Matrix[34]::rotationNormalized().
...
Useful to pass normal matrices to shader, namely with recent commit
b349ca54ad .
13 years ago
Vladimír Vondruš
186c522fe5
Math: added lerpInverted().
13 years ago
Vladimír Vondruš
5787d66d45
Math: test also vector as interpolation phase in Math::lerp().
13 years ago
Vladimír Vondruš
06a4e297bc
Math: deinlined heavy functions, removed redundant `inline`.
...
Also fixed unary RectangularMatrix::operator-() and Vector::operator-()
documentation (was stating that the operation is done in-place, which is
impossible.
13 years ago
Vladimír Vondruš
fc58631aa5
Math: added convenience function Vector::resized().
13 years ago
Vladimír Vondruš
a4a962f686
Math: fixed matrix tests (spotted by Clang).
...
Either GCC 4.8 poorly implements C++11 or it already has support for
some proposed C++14 feature, which allows to elide successive
initializer braces.
13 years ago
Vladimír Vondruš
a21fd0df07
Math: ability to convert matrices from/to external representation.
13 years ago
Vladimír Vondruš
31ce072f39
Math: added initializer list overloads for min() and max().
...
Hopefully including <algorithm> doesn't do much harm to compilation
time.
13 years ago
Vladimír Vondruš
f6ae87376b
Math: added function fma().
13 years ago
Vladimír Vondruš
4ab3ab6534
Math: added Vector::lengthInverted().
...
Also because there are SIMD instructions for that.
13 years ago
Vladimír Vondruš
6124ad3c27
Math: added sqrtInverted() function.
...
There are SIMD instructions for that, so why not have it in place.
13 years ago
Vladimír Vondruš
bf58bb3cb1
Math: rework of component-wise matrix and vector functions.
...
First, removed functions which can be done with Vector's member
functions and functions from Functions.h. More flexibility and less
redundant code which leads to easier SIMD implementation later.
Vector4 a;
Float b = a.maxAbs(); // before
Float b = Math::abs(a).max(); // now
Second, removed all functions from RectangularMatrix which are
implemented in Vector and added conversion from RectangularMatrix to
Vector and back. Also for more flexibility and less redundant code (i.e.
reusing SIMD-optimized Vector::max() instead of writing it again).
Matrix4x3 a;
Float b = a.max(); // before
Float b = a.toVector().max(); // now
13 years ago
Vladimír Vondruš
49154f30c4
Math: added Vector2::perpendicular().
...
Also updated and crosslinked related documentation.
13 years ago
Vladimír Vondruš
0cd98456da
Math: Added Vector2::cross().
13 years ago
Vladimír Vondruš
5e8606a755
Math: added sign() function.
13 years ago
Vladimír Vondruš
d95c44fcc8
Math: test that trigonometric functions work with Unit base class.
...
The test fails.
13 years ago
Vladimír Vondruš
407071dc96
Math: test also possibility of Unit implicit conversions.
13 years ago
Vladimír Vondruš
32d03530e1
Math: test that implicit conversion vector <-> complex/quat can't compile.
13 years ago
Vladimír Vondruš
213499e7bb
Math: test that implicit conversion from/to foreign types can't compile.
13 years ago
Vladimír Vondruš
1d5e3fee7a
Math: test that implicit conversion of underlying type can't compile.
13 years ago
Vladimír Vondruš
cc938a29dd
Math: test that implicit conversion of T to Vector<T> won't compile.
...
"Won't compile" tests are another awesome feature of C++11.
13 years ago
Vladimír Vondruš
45ba444fb8
Math: properly test conversion constexpr also in Vector subclasses.
13 years ago
Vladimír Vondruš
83bda8bbe6
Math: fixed test for denormalize<UnsignedLong, long double>().
...
Amazing what single forgotten literal can do.
13 years ago
Vladimír Vondruš
35eb876303
Various other compilation fixes for OpenGL ES target.
13 years ago
Vladimír Vondruš
ba0f56fa51
No need to use Double type in tests so extensively.
...
Makes porting to OpenGL ES easier.
13 years ago
Vladimír Vondruš
b28261d269
Math: fix compilation of tests with OpenGL ES.
...
Double precision is not supported there, mention that for skipped test
cases.
13 years ago
Vladimír Vondruš
be5c872c8a
Math: fixed two typos in the test.
...
They resulted in fact that the test case didn't actually test anything.
Spotted by Clang.
13 years ago
Vladimír Vondruš
999b7d55c0
GCC 4.6 compatibility: no delegating constructors.
...
Don't know why the corresponding conversion operator can't be constexpr.
13 years ago
Vladimír Vondruš
ba105b1cf6
Math: test constexpr vector conversion.
13 years ago
Vladimír Vondruš
7b140db3ed
Properly test swizzle() constexpr.
...
Removed constExpressions() test case and merged it to others, reducing
duplicate code.
13 years ago
Vladimír Vondruš
f4f44d9d90
Math: allow creating DualComplex/DualQuaternion from real part only.
...
Useful when creating transformation from rotation only.
13 years ago
Vladimír Vondruš
4744b631bb
Math: test pow() constexpr.
13 years ago
Vladimír Vondruš
7cb79b145e
Math: test Constants constexpr.
13 years ago
Vladimír Vondruš
b28b90a9df
Math: merged constExpressions() test cases into other test cases.
...
Simplifies the code and reduces duplicates.
13 years ago
Vladimír Vondruš
3e0e91d7db
Math: renamed {rotationAngle, rotationAxis}() -> {rotation, angle, axis}().
...
DualQuaternion and DualComplex has now only rotation() which returns
full rotation part, rotationAngle() and rotationAxis() on Quaternion and
Complex were renamed to angle() and axis().
13 years ago
Vladimír Vondruš
b00554fd7f
Math: added convenience {Quaternion,DualQuaternion}::isNormalized().
13 years ago
Vladimír Vondruš
1790f37295
Math: added convenience functions {Complex,DualComplex}::isNormalized().
13 years ago
Vladimír Vondruš
3db2aa13c4
Math: added convenience function Vector::isNormalized().
13 years ago
Vladimír Vondruš
da93b2ad6a
Math: ability to create Quaternion and DualQuaternion from matrix.
13 years ago
Vladimír Vondruš
9128820e35
Math: ability to create Complex and DualComplex from matrix.
13 years ago
Vladimír Vondruš
33058aa5b0
Math: Matrix::invertedOrthogonal(), Matrix{3,4}::invertedRigid().
...
Renamed original invertedEuclidean() functions to invertedRigid() and
simplified them using isRigidTransformation().
13 years ago
Vladimír Vondruš
dfe2571047
Math: added Matrix{3,4}::isRigidTransformation().
13 years ago
Vladimír Vondruš
4714cafedc
Math: added Matrix::isOrthogonal().
13 years ago
Vladimír Vondruš
408f40a908
Math: renamed MathTypeTraits to TypeTraits.
...
As there is no Magnum::TypeTraits struct anymore, there is no need to
have redundant name in it. Hopefully Doxygen will handle the difference
between this and Corrade's TypeTraits.h properly.
13 years ago
Vladimír Vondruš
75d8fefdde
Math: ability to access also matrix row vectors.
13 years ago
Vladimír Vondruš
a0b83edd2b
Relicensing to MIT/Expat license, part 4: CMake and documentation files.
...
They didn't contain license header before, but I think adding it also
there wouldn't do any harm. Documentation is also integral part of the
codebase.
13 years ago