Vladimír Vondruš
a28e14491c
Math: verify that TypeTraits work correctly for signed infinities.
7 years ago
Vladimír Vondruš
3cf9dbf409
Math: added component-wise equal()/notEqual() for vectors.
7 years ago
Vladimír Vondruš
3d5f50ac49
Test: use the new setTestCaseTemplateName().
7 years ago
Vladimír Vondruš
a1cc0cb62d
Math: off-center Matrix4::perspectiveProjection().
7 years ago
Vladimír Vondruš
8e5ecfacac
Math: ignore NaNs also in Vector::min(), max() and minmax().
...
To have the API consistent.
7 years ago
Vladimír Vondruš
46fdb38cd2
Math: make batch min() / max() / minmax() ignore NaNs.
7 years ago
Vladimír Vondruš
d38303505d
Math: added batch isInf() and isNan().
7 years ago
Vladimír Vondruš
da43af403e
Math: minor cleanup and code simplification.
7 years ago
Vladimír Vondruš
28f12f9a5e
Math: improve the NaN propagation tests even more.
7 years ago
Vladimír Vondruš
75ffd39fe0
Math: make it possible to use Deg/Rad in all functions.
...
This should have been here ages ago, haha.
7 years ago
Vladimír Vondruš
7941a769cd
Math: added IsUnitless type trait.
7 years ago
Vladimír Vondruš
19844352ff
Math: added UnderlyingTypeOf.
7 years ago
Vladimír Vondruš
aa2adb7222
Math: add IsScalar, IsVector, IsIntegral and IsFloatingPoint type traits.
...
The standard ones are not good enough, so let's roll out my own.
7 years ago
Vladimír Vondruš
442d5576d0
Math: change the way BoolVector is printed to Debug.
...
Found while working on the Python bindings --- BoolVector4(0b1010) got
printed as BoolVector(0101), which is totally confusing. Now it prints
it in a way that looks exactly the same as when constructing the vector
with binary literals.
7 years ago
Vladimír Vondruš
4b6fabb004
Math: ability to Debug colors as actual colored squares.
7 years ago
Vladimír Vondruš
36ba5f4333
Math: ensure ZeroInit and IdentityInit constructors are explicit.
...
Like NoInit ones. Not sure what I was doing there.
7 years ago
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š
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š
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š
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š
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š
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š
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š
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
Vladimír Vondruš
7738fcc011
Math: use CORRADE_COMPARE() to compare non-boolean values.
...
Gives better error diagnostics.
8 years ago
Vladimír Vondruš
f5e30bb5d3
Math: minor coding style cleanup.
8 years ago
Borislav Stanimirov
f7f2ab8cb5
Math: added StrictWeakOrdering for math types
8 years ago
Vladimír Vondruš
8be57d1a21
Math: I should have tested this.
...
Did I ever check the CIs?
8 years ago
Vladimír Vondruš
d7d8e49de2
Math: make all literals usable with Utility::Tweakable.
8 years ago
Vladimír Vondruš
6d7558672d
Math: MSVC 2015 constexpr fun!
8 years ago