Vladimír Vondruš
d474f9d176
Math: return an array reference instead of a pointer from data().
...
This makes it possible to conveniently do things like
Containers::StridedArrayView1D<Float> array = …;
Vector4 vector{NoInit};
Utility::copy(array, vector); // or the other way around
which is especially useful together with the new JSON classes. In some
cases this means the function is no longer constexpr, but those weren't
constexpr because it was useful for anything, they were only because it
was possible. So this breakage shouldn't do any harm I think.
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š
822fa0d644
Updated copyright year.
4 years ago
Vladimír Vondruš
3cf4573c0e
Math: drop explicitly defaulted copy constructors.
...
These shouldn't be needed (the newer classes such as Half or
CubicHermite don't have them and work fine), moreover Clang 12 is now
emitting the following warning for them:
Definition of implicit copy assignment operator for 'Foo' is
deprecated because it has a user-declared copy constructor
[-Wdeprecated-copy]
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š
7413d2053f
Math: doc++
5 years ago
Vladimír Vondruš
2066d82ea4
Shaders: suffix all existing shaders with GL.
...
To make room for Vulkan shaders. Also renaming the headers, of course
everything is still aliased to the old names (and marked as deprecated).
5 years ago
Vladimír Vondruš
3d136503d8
Updated copyright year.
5 years ago
Vladimír Vondruš
5a1f43f20b
Switch to the new & optimized GenerateSequence from Corrade.
...
This should help slightly with compiler memory usage, on GCC 10 the huge
Trade::MaterialData test used "only" 309 instead of 318 MB after this
change.
5 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š
fc3382ec36
Math: make dot() twice as fast in Debug.
6 years ago
Vladimír Vondruš
498f4c59e1
Math: fix angle() returning NaN for close arguments.
6 years ago
Vladimír Vondruš
1c46bdb959
Math: move clamp() definition from Functions.h to Vector.h.
...
Need it for angle().
6 years ago
Vladimír Vondruš
c8afe0f732
Math: make Vector::pad() default argument work with Half.
...
Got lucky enough that the default zero-initialization constructor does
exactly what I need. Otherwise ugh I don't know what I would do.
6 years ago
Vladimír Vondruš
43f5f06956
Math: avoid warnings when calling length() on an integer Vector.
...
Also update the docs to hint the result may be imprecise on integer
types, and suggest Manhattan length as well.
6 years ago
Vladimír Vondruš
6fbedd8f52
Revert "doc: pile on more Doxygen workarounds."
...
This reverts commit 0b7831c1ad .
6 years ago
Vladimír Vondruš
0b7831c1ad
doc: pile on more Doxygen workarounds.
...
Sad! https://github.com/doxygen/doxygen/issues/7472
6 years ago
Vladimír Vondruš
a920722839
doc: label deprecated APIs and stuff new since 2019.10 with version info.
...
Should make new things more discoverable, avoid confusion when a
documented API isn't there and reduce the need for maintaining multiple
separate versions of the docs.
7 years ago
Vladimír Vondruš
7a1162acc7
Math: one more needless operator[] call in scatter().
7 years ago
Vladimír Vondruš
17b3c8fac5
Math: support numeric indexing in gather() / scatter() as well.
7 years ago
Vladimír Vondruš
f2f1cac598
Math: directly access Vector components in gather() / scatter().
...
Speeding up debug builds a bit.
7 years ago
Vladimír Vondruš
bc88faa215
Math: no Vector::operator-() and Vector2::perpendicular() on unsigned.
...
Reported by MSVC on Magnum Python Bindings.
7 years ago
Vladimír Vondruš
1887fe0ab9
Math: added a scalar equal() / notEqual() variant.
7 years ago
Vladimír Vondruš
3cf9dbf409
Math: added component-wise equal()/notEqual() for vectors.
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š
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š
4b4b8efc1b
Math: doc++
...
Fixing Engrish while doing the Python bindings.
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š
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š
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š
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