Vladimír Vondruš
cedc0d6eeb
Prefer CORRADE_TARGET_* instead of __GNUC__, __clang__ and _MSVC_VER.
...
While branching on a compiler is rather common, checking a particular
compiler version should be needed only rarely. Thus minimize use of such
macros to make them easier to grep for.
4 years ago
Vladimír Vondruš
5513eba398
Math: packed debug output for angles, matrices and vectors.
...
Not documenting this publicly as it has a certain smell (needs better
naming, mainly), but I need this for a less verbose output in certain
tools.
4 years ago
Vladimír Vondruš
505ad471ad
CMake: use the CMAKE_FOLDER variable instead of FOLDER property.
...
It limits the support for CMake 3.12+, but it's much less verbose and I
don't expect people to use ancient CMake versions with IDEs like Xcode
or VS anyway, so this should be fine.
4 years ago
Vladimír Vondruš
8057051d9a
Document what each #include <algorithm> is for.
...
Or remove it, if not for anything anymore.
4 years ago
Vladimír Vondruš
3b2ad338e2
Port from Utility::formatString() to Utility::format() where possible.
...
There's still many cases where the formatted string is compared to a
std::stringstream, there it doesn't make sense to switch.
4 years ago
Vladimír Vondruš
822fa0d644
Updated copyright year.
4 years ago
Vladimír Vondruš
5c6b98391d
Math,DebugTools: adapt tests for Android differences in NaN printing.
...
What a waste of energy. I need my own float printing code already.
4 years ago
Vladimír Vondruš
e0ee451a1b
Math: XFAIL some packing tests for x86 Android.
...
Well, I can't tell if it's just 32-bit x86 Android, but it definitely
works well on my ARM64 device.
Also updated the defines to use the consistent CORRADE_TARGET_* macros
instead of the platform-specific mess.
4 years ago
Vladimír Vondruš
22d630db5f
Math: what's the deal with Emscripten and GLES(!)-specific ifdefs here?!
...
Especially the GLES define is some *really weird* leftover from the days
where GL was hardcoded everywhere. What the heck.
4 years ago
Vladimír Vondruš
7328fa9ab4
Math: remove obsolete comments in a test -- this is a static assert now.
4 years ago
Vladimír Vondruš
fb51f25a7b
Math: workaround rounding errors in assert tests in latest GCC (glibc?).
...
Only in release. One of the number now had 6 at the end instead of 5.
Not my problem, so using a different angle to hopefully circumvent that.
4 years ago
Vladimír Vondruš
39d482cceb
Math: fix Clang "unused but set" warnings in benchmarks.
4 years ago
Vladimír Vondruš
304819435d
Math: no need to use a <string> in this test.
5 years ago
Vladimír Vondruš
ff1b0ab307
Math: add off-center variants of 2D/3D orthographic projection as well.
...
Was just perspective projection right now.
5 years ago
Vladimír Vondruš
3697125c7d
Math: disallow reflections in {Complex,Quaternion}::fromMatrix().
...
And update docs in Matrix[34]::rotation() and related functions to note
this. This is a breaking change that may cause existing code to start
asserting.
5 years ago
Vladimír Vondruš
e9f2101b15
Math: added Distance::pointPoint() and Intersection::pointSphere().
...
Those add nothing of value as they only wrap trivial code, but make the
operations easier to discover, and that's what matters.
5 years ago
Vladimír Vondruš
f9661fe402
Math: add castInto() variants for UnsignedLong/Long.
...
There's now 24 overloads for unsigned types and 24 for signed types,
which is all possible combinations. Not adding an ability to cast
between signed and unsigned as I'm not sure what should be done there.
5 years ago
Vladimír Vondruš
7d82352a13
Math: add an ability to construct a Range1D from Math::Vector<1, T>.
...
A Vector<1, T> is implicitly constructible from T but not vice versa (to
avoid nasty collisions with builtin operators on scalars) so this is
needed.
5 years ago
Vladimír Vondruš
dd3ce93888
Math: MSVC 2015, you ICEd.
5 years ago
Vladimír Vondruš
08a6e7d957
Math: explicit test that all types are trivially copyable.
...
I saw some copy constructors here and there and wasn't sure.
5 years ago
Vladimír Vondruš
7072befbdb
Math: generalize slicing and expanding to arbitrarily-sized matrices.
...
Originally was done only for square matrices, but now I need that for
converting 3x3 -> 3x4 and back (UBO packing, ugh ugh), so let's
generalize.
5 years ago
Vladimír Vondruš
a347a2b3bd
Math: make it possible to create an identity RectangularMatrix as well.
5 years ago
Vladimír Vondruš
ed9deff432
Test: adapt to a less shitty CORRADE_COMPARE().
5 years ago
Vladimír Vondruš
4dace92581
Math: add castInto() overloads for Float and Double.
5 years ago
Vladimír Vondruš
41b59d8176
Math: add [Unsigned]Byte/[Unsigned]Short variants of castInto().
5 years ago
Vladimír Vondruš
3d136503d8
Updated copyright year.
5 years ago
Vladimír Vondruš
d2961f19f4
Test: use new TestSuite API to simplify things.
5 years ago
Vladimír Vondruš
55d7a1e6e0
doc: updated changelog and credits.
6 years ago
Vladimír Vondruš
dbc67a01ce
Math: reorder test to be in the same order as in the header.
6 years ago
Vladimír Vondruš
07ba09c700
Math: minor cleanup.
...
No need to use contractions, inverseRayDirection is okay because nobody
needs to type it anywhere. Also no need for the `ones` vector in the
test, Float/Vector3 works as well.
6 years ago
janos
6a0fdf2194
add ray range interection algorithm
6 years ago
Vladimír Vondruš
686b915bc3
Math: this test wasn't right.
...
Uncovered after the latest Emscripten-related update to
CORRADE_LONG_DOUBLE_SAME_AS_DOUBLE.
6 years ago
Vladimír Vondruš
ef7232e71d
Math: clean up obsolete test workflows.
6 years ago
Vladimír Vondruš
095408791f
Updated changelog and credits.
6 years ago
Squareys
f69f3393ec
Math: Add DualQuaternion/DualComplex::from(rotation, translation)
...
Signed-off-by: Squareys <squareys@googlemail.com>
6 years ago
Vladimír Vondruš
e6322dcfd1
Math: use angle literals in all test code.
...
It was originally done using the Deg() / Rad() constructors in order to
be compatible with GCC 4.6, but fortunately those days are long gone.
Co-authored-by: Squareys <squareys@googlemail.com>
6 years ago
Vladimír Vondruš
83d6509595
Math: adapt to changes to Tweakable internals.
6 years ago
Vladimír Vondruš
9de4717f0e
Math: add popcount().
6 years ago
Vladimír Vondruš
89e3067009
Math: hmm, why this isn't in the FunctionsBenchmark, then?
...
Probably because it predates it.
6 years ago
Vladimír Vondruš
70336a6a98
Math: remove pointless Emscripten restrictions in TypeTraits.
...
Size of long double is now tested in Corrade itself, so no need for any
of this.
6 years ago
Vladimír Vondruš
f225497475
Math: assert valid binomialCoefficient() input instead of returning 0.
6 years ago
Vladimír Vondruš
53a26ad024
Math: use 64-bit literals in a test to be really really sure.
6 years ago
Vladimír Vondruš
f1c713f4c8
Minor cleanup, doc++, updated changelog & credits.
6 years ago
janos
8013afc28c
Math: add binomial coefficient function.
6 years ago
Pablo Escobar
daa6d9125e
Math: add fmod function
6 years ago
Vladimír Vondruš
ca8172311d
Math: FFS, GCC.
6 years ago
Vladimír Vondruš
12577ce07f
Math: verify normal matrix calculation against the ground truth code.
...
It gives the same result, nevertheless something is not right when it
comes to negatively scaled meshes. Postponing the rest of the
investigation to later.
6 years ago
Vladimír Vondruš
1026aee80e
Moved the NoInit tag from Math to the root namespace.
...
The old one is deprecated, and will be removed in a future release.
Unfortunately, to avoid deprecation warnings, all use of NoInit in the
Math library temporarily have to be Magnum::NoInit This will be cleaned
up when the deprecated alias is removed.
6 years ago
Vladimír Vondruš
19e0e96d74
Updated copyright year.
6 years ago
Vladimír Vondruš
5be7fbe1e8
Math: make Range2D and Range3D properly convertible from std::pair.
...
Not sure what was I doing in 64f8a90095 .
6 years ago