Vladimír Vondruš
3626562e1d
Adapted to Corrade changes.
...
Mostly missing includes now.
7 years ago
Vladimír Vondruš
f8b9c69b16
Don't use std::tie() on std::pair().
...
It's nice and all, but including the whole <tuple> just for that is not
worth it.
7 years ago
Vladimír Vondruš
b61f8262e9
Math: inline a helper function.
7 years ago
Vladimír Vondruš
e4e90bd75c
Math: explicitly specialize 3x3 matrix determinant.
...
Together with the operator[] deinilining that makes matrix inverse
almost six times faster than before. Now 2x faster in debug builds than
GLM (was 3x slower before).
7 years ago
Vladimír Vondruš
05b1cefda5
Math: avoid operator[] calls where possible (and not too verbose).
...
In debug builds (where nothing is inlined), this makes matrix
multiplication run in 33% of the time and matrix inversion roughly twice
as fast.
7 years ago
Vladimír Vondruš
5cf4f6bb19
Math: be nicer to people and preserve compatibility.
...
This broke backwards compatibility pretty heavily for little reason.
Putting back a compat include.
7 years ago
Vladimír Vondruš
8c1d62d97c
Math: use CORRADE_TARGET_EMSCRIPTEN instead of MAGNUM_TARGET_WEBGL.
...
When WebGPU is here, what would we gonna do?
7 years ago
Vladimír Vondruš
7b3110e7f8
Math: missing includes when building with CORRADE_NO_DEBUG.
7 years ago
Vladimír Vondruš
754c84525e
The <cmath> header is not allowed anymore.
7 years ago
Vladimír Vondruš
0dd763fe9d
Math: fix deprecated build.
7 years ago
Vladimír Vondruš
53c1549e69
Math: deprecate Frustum::planes() in favor of begin()/end().
...
This allows us to get rid of the StaticArrayView, which is the last
roadblock on the way to a single-header math. The planes() are now
deprecated, along with the include, and will get removed in a future
release.
7 years ago
Vladimír Vondruš
8079cda8aa
Math: check for OOB access in Frustum::operator[]().
7 years ago
Vladimír Vondruš
3a1713d549
Math: no need to include <tuple> just for std::tie() in tests.
...
Unpack the pairs manually instead.
7 years ago
Vladimír Vondruš
c12680ec38
Math: move batch functionality to FunctionsBatch.h.
...
Avoids including a (relatively) large ArrayView in Functions.h. Yes,
we are now at a point where 500 lines matter.
7 years ago
Vladimír Vondruš
fd51ef662b
Math: avoid std::tie() in DualQuaternion sclerp..
...
It needs #include <tuple> and that's heavier than I'd like.
7 years ago
Vladimír Vondruš
563dee0436
Math: provide our own min() / max().
...
The one from std:: needs to #include <algorithm> to be used portably.
That's insane, so it's a big nope. Also, the standard implementation
takes the value always by reference, making it unnecessarily slow for
small types. We do better here.
7 years ago
Vladimír Vondruš
547a3f3cea
Math: use a dedicated type for HSV colors instead of a tuple.
...
Pros:
* faster compile times (#include <tuple> is 13k lines, ugh)
* ability to have NoInit and ZeroInit constructors
* ability to do fuzzy compare
* named members, so we don't have to use mutable std::tie()
Cons:
* ... none?
The old Color[34]::Hsv is still a tuple and the new ColorHsv is
convertible to/from it (and even std::tie() works). These are all
deprecated (along with the <tuple> include).
7 years ago
Vladimír Vondruš
cc1d878cff
Math: put types before static functions.
7 years ago
Vladimír Vondruš
8ee5f5cc6d
Math: include proper header for std::div().
7 years ago
Vladimír Vondruš
e98e10a58e
Math: make Constants base incomplete.
7 years ago
Vladimír Vondruš
676b19ec0b
Math: avoid using std::array.
...
Plain C array and a view on it is much better. And lighter weight. And
compiles faster.
7 years ago
Vladimír Vondruš
93b62148ce
Math: avoid BOMs.
...
Caused acme.py to fail. I need to fix acme.py to handle this properly,
but the BOM should not have been here in the first place.
7 years ago
Vladimír Vondruš
77a8c0c99b
Math: make it possible to opt-out of Tweakable parsers.
...
Again, for magnum-singles export.
7 years ago
Vladimír Vondruš
cee530733e
Math: make it possible to opt out of Debug output operators.
...
Undocumented at this point, will be used for magnum-singles export.
7 years ago
Vladimír Vondruš
e7af6bf07b
Math: minor cleanup and code shuffling.
7 years ago
Vladimír Vondruš
64bc7f9c8e
Math: moved configuration value parsers to a dedicated header.
...
There's a lot of string operations and that's nothing good to have
included everywhere. Should speed up the compilation quite a bit.
7 years ago
Vladimír Vondruš
b24ffa4a3e
Use min() / max() / minmax() from Math instead of std::.
...
First step to avoid the <algorithm> header.
7 years ago
Vladimír Vondruš
71c90e6024
Math: fix MSVC integer conversion warnings in a test.
7 years ago
Vladimír Vondruš
9a8e874eb4
Math: minor cleanup.
7 years ago
Vladimír Vondruš
5bfdd71af6
Math: microoptimizations.
7 years ago
Vladimír Vondruš
5a010269bd
Math: implement component-wise bool operations on BoolVector.
7 years ago
Vladimír Vondruš
e75c7639e7
Math: test Matrix[34]::scalingSquared().
7 years ago
Vladimír Vondruš
2b08995c24
Math: after the pack() fix, some Android issues are no more. Yay!
7 years ago
Vladimír Vondruš
38573c7a82
Math: we're not signing here, no.
7 years ago
Vladimír Vondruš
e62ce4faa6
Math: fix pack() to correctly select the nearest integral value.
...
Together with an assorted set of off-by-one changes to tests involving
packing, in addition to the changes done in the previous test cleanup
commit. Now Color3 sRGB conversion rountrips correctly.
7 years ago
Vladimír Vondruš
a87c7805f4
Math: rework sRGB, XYZ and packing tests with emphasis on rountripping.
...
Makes them quite simpler. Doesn't pass for the sRGB roundtrip. Who would
have thought.
7 years ago
Vladimír Vondruš
9c35b11521
Math: fix unused function warning on Emscripten.
7 years ago
Vladimír Vondruš
5fc246b908
Math: compile forgotten code snippets.
7 years ago
Vladimír Vondruš
476dc5c3f5
Math: compile code snippets from Packing.h.
7 years ago
Vladimír Vondruš
2149f7b869
Wrap all tests in unnamed namespaces.
...
This makes the compiler warn about test cases that aren't ever used,
which is a good thing.
7 years ago
Vladimír Vondruš
e6b7aa12fa
Updated copyright year.
7 years ago
Vladimír Vondruš
ea7e8c9aaf
Math: proper forward declaration for Constants.
...
Messed that up in c5d31d74e3 , causing lots
of Clang warnings. Sorry 'bout that.
8 years ago
Vladimír Vondruš
c5d31d74e3
Math: provide forward declaration for Constants.
...
No point in having it repeated in Magnum.h, since we include Math/Math.h
anyway.
8 years ago
Vladimír Vondruš
7b1aa6f497
Math: removed deprecated uppercase *HSV APIs from Color.
...
Deprecated since c27a12bb30 (December
2016). Use the CamelCased *Hsv APIs instead.
8 years ago
Vladimír Vondruš
5c5ecb5ff8
Math: removed deprecated (and confusing) normalize() / denormalize().
...
Deprecated since dd2058cee3 (December
2016), use more clearly named Math::pack() and unpack() instead.
8 years ago
Vladimír Vondruš
00b0a814e0
Dropped GCC 4.7 support.
...
Interesting that many of the annoyances still apply to 4.8.
8 years ago
Vladimír Vondruš
3e3eb21181
Math: correct order for test implementations.
8 years ago
Vladimír Vondruš
f5b90cefba
Math: whoops, forgot about StrictWeakOrdering for Frustum.
...
Just a stretched version of the test for Matrix4. Hope that's okay.
8 years ago
Vladimír Vondruš
cf8db303dc
Updated credits and changelog.
8 years ago
Vladimír Vondruš
8dc62b5a49
Math: deduplicate test code.
8 years ago