Vladimír Vondruš
d9efea269a
Math: no need to pass scalars via a const&.
4 years ago
Vladimír Vondruš
3d136503d8
Updated copyright year.
5 years ago
Vladimír Vondruš
9de4717f0e
Math: add popcount().
6 years ago
Vladimír Vondruš
1510d41c4b
Math: this is also wrongly grouped.
6 years ago
Vladimír Vondruš
8019b285bd
Math: put reflect() and refract() outside of irrelevant group.
...
Got overlooked when merging this contribution.
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
Vladimír Vondruš
cb4f6183dc
Doc++, changelog, credits and version marker updates.
6 years ago
Pablo Escobar
daa6d9125e
Math: add fmod function
6 years ago
Vladimír Vondruš
5222cf3478
doc: change all "latest" additions/deprecations to 2020.06.
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š
1c46bdb959
Math: move clamp() definition from Functions.h to Vector.h.
...
Need it for angle().
6 years ago
Vladimír Vondruš
081dd8981f
Doxygen, FFS.
6 years ago
Nghia Truong
1ef813fdad
Math: add reflect() and refract() functions.
...
Co-authored-by: Vladimír Vondruš <mosra@centrum.cz>
6 years ago
Vladimír Vondruš
92b1cdf6b7
Math: pass strided array views by const&.
...
It has the size of three pointers, which is more than a little.
Unfortunately doing just that causes infinite recursion, so be a little
more specific when delegating from the overloads.
6 years ago
Vladimír Vondruš
742dc406fd
Math: don't include FunctionsBatch.h from Functions.h anymore.
...
These two got split in 2019.10 but one included the other for backwards
compat. It makes everything suffer from worse compile times, so not
doing that anymore.
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š
13b4bf8461
Math: use __builtin_sincos for sincos() on GCC.
...
Makes this thing faster on Debug. But I'm not sure whether it's due to
less function calls or this intrinsic being actually faster, heh.
Probably a combination of both.
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š
bd4ed9ae0e
Math: make batch functions accept strided array views.
...
The obvious improvement.
7 years ago
Vladimír Vondruš
2a9f4a1fed
Math: hint that lerpInverted() can be used for rane mapping.
7 years ago
Vladimír Vondruš
d38303505d
Math: added batch isInf() and isNan().
7 years ago
Vladimír Vondruš
571ba7b17f
Math: group the free functions to make them easier to look up.
7 years ago
Vladimír Vondruš
d9da018af7
Math: don't hide the vector/scalar overloads from docs.
...
People should be able to see the IsScalar requirements and how the
vector types are passed around as well.
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š
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š
754c84525e
The <cmath> header is not allowed anymore.
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š
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š
8ee5f5cc6d
Math: include proper header for std::div().
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š
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š
ebedbce2f2
Math: vector overloads for isInf() and isNan().
8 years ago
Vladimír Vondruš
edff639204
Math: functions were not inline by mistake.
...
It's inline for all others of similar size, so why not this.
8 years ago
Vladimír Vondruš
7a0bf3018f
Math: new min(), max() and minmax() overloads taking plain C arrays.
8 years ago
Vladimír Vondruš
e997344b8c
Math: new CubicHermite class.
...
For spline interpolation.
8 years ago
Vladimír Vondruš
c2c6b9f22b
Math: added lerp() and slerp() for complex numbers.
...
It's a straight copy of the code for quaternions -- it could probably be
simplified a bit, but I don't have the necessary brain cells at the
moment. I tried the following but failed:
retun Complex::rotation(acos(cosAngle)*t)*normalizedA;
8 years ago
Vladimír Vondruš
64f8a90095
Math: ability to construct a Range from std::pair.
...
Useful to feed the output from Math::minmax() directly to a Range.
8 years ago
Vladimír Vondruš
da7d443b67
Math: added lerp(T, T, bool).
...
Last missing piece for fully orthogonal functionality. There was a
lerp(T, T, BoolVector) before, but not a scalar version. This also makes
scalar interpolation phase in select() working with arbitrary types.
8 years ago
Vladimír Vondruš
cc51bff893
Math: make lerp() take any type.
...
Needed in order to easily pass interpolators to the Animation library.
8 years ago
Vladimír Vondruš
002d2260fd
Math: added select().
...
For animations I need a constant interpolator with the same API as
lerp() and friends.
8 years ago
Vladimír Vondruš
6e74966d94
Math: doc++
...
Make the whole vector bold, including the subscript.
8 years ago
Vladimír Vondruš
92071a342c
Math: added isInf() and isNan()
8 years ago
Vladimír Vondruš
39b14ae29d
Math: Android supports std::hypot(), round() and fma() now.
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
Vladimír Vondruš
2145ae9b96
Dropped NaCl support.
9 years ago