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š
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š
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š
5fc246b908
Math: compile forgotten code snippets.
7 years ago
Vladimír Vondruš
e6b7aa12fa
Updated copyright year.
7 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š
0cf65741ae
Math: helpfully print the offending values in all assertions.
8 years ago
Vladimír Vondruš
780e5258cc
Math: consistently use arccos() in math equations.
8 years ago
Vladimír Vondruš
68f34b3283
Math: STUPID EFFING DOXYGEN GODDAMIT I HATE YA WITH PASSION
8 years ago
Vladimír Vondruš
04f4917f7b
Math: disable floating-point vector ops on integral types.
...
Avoids accidents.
8 years ago
Vladimír Vondruš
261221c864
Math: make projection operator math consistent everywhere.
8 years ago
Vladimír Vondruš
105cef5efd
No need to use fully qualified name for \debugoperator.
8 years ago
Vladimír Vondruš
a421b50be3
Math: doc++
8 years ago
Vladimír Vondruš
468af3284a
Math: removed long-deprecated member dot(), angle(), lerp(), cross().
...
Use free functions in Math namespace instead.
8 years ago
Vladimír Vondruš
2136466f0f
Math: doc++, add search aliases for GLSL functions.
8 years ago
Vladimír Vondruš
623fa97970
Updated copyright year.
8 years ago
Vladimír Vondruš
05bb8b419a
Math: updates for the new documentation theme.
8 years ago
Criss
98f920527e
Math: get rid of needless GenerateReverseSequence utility.
9 years ago
Michael Dietschi
b12fe77910
Fix a possible OOB access when reading vector/matrix from configuration.
9 years ago
Vladimír Vondruš
7a16273e5d
Updated copyright year.
9 years ago
Vladimír Vondruš
6e10b2e205
Math: doc++
...
The TODOs were removed and put into GitHub projects to be a bit more
visible to random strangers.
9 years ago
Vladimír Vondruš
353d7ff59d
Math: implemented minmax() for arbitrary vectors.
9 years ago
Vladimír Vondruš
32f357752f
Math: the world is not just about OpenGL.
10 years ago
Vladimír Vondruš
56e75295be
Math: mention more useful dot product and determinant properties.
10 years ago
Vladimír Vondruš
40d60f6a3f
Math: make all constructor noexcept and test their behavior.
10 years ago
Vladimír Vondruš
737e92bc3e
Math: remove unnecessary assignment operators.
...
Caused problems when specifying `noexcept` in classes with members from
Math namespace.
10 years ago
Vladimír Vondruš
951f116f5b
Math: added RectangularMatrix::flipped{Cols,Rows}().
10 years ago
Vladimír Vondruš
633d792e3d
Math: added Vector::flipped().
10 years ago
Vladimír Vondruš
eaeda24399
Don't restrict Double usage on OpenGL ES.
...
Restrict only what's not defined by GL on the ES flavor (double
attributes and uniforms). I love the smell of burning code.
10 years ago
Vladimír Vondruš
28d7400a82
Math: doc++
10 years ago
Vladimír Vondruš
a4fbea42d0
Math: proper implementation of Vector::isZero() for integers.
...
The thing is:
* Doing std::abs() and comparing to some epsilon value is crazy thing
to do with integers.
* When using unsigned integers, Clang rightfully complained that
calling std::abs() on these is a sign of insanity. This fixes it too.
10 years ago
Vladimír Vondruš
f3d774fa48
Math: revert ability to convert Vector<1, T> to T.
...
Doesn't solve problem I hoped it would solve (adding pointer and
Vector<1, size_t> still doesn't compile), breaks GCC 4.7 build in some
crazy way and makes certain previously-working operations (like
operator== on Vector<1, int> and int) ambiguous. Not worth pursuing
further, I think.
This reverts commit ca0892f026 .
This reverts commit d6d0fd1890 .
10 years ago
Vladimír Vondruš
ca0892f026
Math: make it possible to convert Vector<1, T> to T.
10 years ago
Vladimír Vondruš
23646e6690
Hell, this project is big.
10 years ago
Vladimír Vondruš
6e8c16c960
MSVC 2015 Update 1: fixed nearly all constexpr bugs.
11 years ago
Vladimír Vondruš
40a12441c0
Math: haha, pushed without test.
...
Kill me.
11 years ago
Vladimír Vondruš
6e73dee096
Math: avoid dependency on Functions.h in DualQuaternion.h.
...
Is it still justifiable to do things like this or am I too paranoid
about compilation times now?
11 years ago
Vladimír Vondruš
5160779e5e
Math: doc++
11 years ago
Vladimír Vondruš
670c9d0763
Adapted to Corrade::Utility::Debug changes.
11 years ago
Vladimír Vondruš
0aa16595eb
Use new-style debug operators everywhere.
11 years ago
Vladimír Vondruš
86c8fdef8d
Fix linking of tests on MinGW-w64 GCC 5.1.
...
It worked flawlessly when crosscompiled from Linux, but compiling that
natively causes the linker to loudly complain about undefined references
to ConfigurationValue structs. I think it worked well under 4.9.2 (but
that mess had a slew of other ugly problems, such as complete inability
to produce non-crashing C++11 code under x64). The linker error is
caused only because I tried to reduce binary bloat, so I'm just
disabling that for MinGW and screw that. No problem under MSVC.
11 years ago
Vladimír Vondruš
000d8f8129
MSVC 2015 compatibility: Math external conversion constexpr issues.
...
Caused by inability to delegate constexpr constructors. Subclasses are
okay, fortunately.
11 years ago
Vladimír Vondruš
d805e87f21
MSVC 2015 compatibility: Math conversion constructor constexpr issues.
...
Some could be worked around, but the rest is prevented by inability to
delegate constexpr constructors.
11 years ago
Vladimír Vondruš
d7ca99523f
Math: missing include for std::max() on MSVC.
...
Enabled only for MSVC, as GCC/Clang has max() in some (way smaller)
internal header and that is preferred to keep compilation times in sane
bounds.
11 years ago
Vladimír Vondruš
7f6c7b09d8
MSVC 2015 compatibility: issue with constexpr and delegating constructors.
11 years ago
Vladimír Vondruš
115fd0c41c
Math: include macros header only on deprecated build.
11 years ago
Vladimír Vondruš
1d9e6210d8
Use anonymous typed enum instead of static const member variable.
...
The reason behind this is that it's not possible to take address of the
enum value -- the generated code can be simpler and no symbol is
exported.
11 years ago
Vladimír Vondruš
d0baab2bfe
I hate GCC.
...
Why the hell it does not have std::is_trivially_constructible until
version 5?!
11 years ago
Vladimír Vondruš
1b0da5b2df
Math: ability to construct all types without initializing the contents.
...
Useful for squeezing out last bits of performance, e.g. in this case:
Vector3 a;
a[0] = something++;
a[1] = something++;
a[2] = something++;
In the code all elements are first zeroed out and then overwritten
later, thus it might be good to avoid the zero-initialization:
Vector3 a{Math::NoInit};
a[0] = something++;
a[1] = something++;
a[2] = something++;
This will of course be more useful in far larger data types and arrays
of these.
11 years ago