Vladimír Vondruš
2145ae9b96
Dropped NaCl support.
9 years ago
Vladimír Vondruš
7a16273e5d
Updated copyright year.
9 years ago
Vladimír Vondruš
eeac7e2868
Math: minmax() for a pointer range.
...
Thanks @Squareys for unblocking my brain!
9 years ago
Vladimír Vondruš
4cf9459110
Math: return default-constructed value for min()/max() on empty range.
9 years ago
Vladimír Vondruš
9e796b76c8
Math: added clamp(Vector, Vector, Vector), {min,max}(Vector, T)
...
In order to provide consistent API with GLSL. Pretty annoying omission.
9 years ago
Vladimír Vondruš
dd2058cee3
Math: renamed {de,}normalize() to {,un}pack() in a new Packing.h header.
...
To be more consistent with GLSL naming. Also, the original naming was
quite misleading, as normalize() is used in GLSL for something
completely different.
If building with deprecated APIs, the Functions.h header includes the
new Packing.h header and the {de,}normalize() functions are defined as
deprecated aliases to the new functions. This will be removed at some
point in the future.
9 years ago
Vladimír Vondruš
dba0ea320d
Math: vector/scalar overload for pow().
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š
9fa0d8c796
Math: fix lerp() with BoolVector.
...
For some reason I swapped the order and took from the second parameter
when the value was 0. Probably because of the ?: operator.
10 years ago
Vladimír Vondruš
23646e6690
Hell, this project is big.
10 years ago
Vladimír Vondruš
9ebd6ad46d
Math: added pow(), log() and exp().
...
Just wrappers around std::pow(), std::log() and std::exp() to have the
complete toolbox consistent.
11 years ago
Vladimír Vondruš
ab35741221
Math: minor cleanup, reordering and test renaming.
11 years ago
Vladimír Vondruš
247d8dba6f
Math: added lerp(T, T, BoolVector).
...
In GLSL this is called mix() and I thought this is there for a long
time, but apparently it got included only in GL 4.5 / ES 3.1.
11 years ago
Vladimír Vondruš
e6567af364
Math: don't depend on char signedness in test.
...
Hopefully that was only in the test.
11 years ago
Vladimír Vondruš
58f16ccdb5
Math: proper fuzzy-compare for std::pair<float, float>.
...
I should update TestSuite to handle this automagically.
11 years ago
Vladimír Vondruš
e7cae67e9f
Math: added sincos().
...
Mainly a convenience function in case you want to compute sin and cos of
the same, potentially longer expression, and you don't want to have
repeated code or temporary variables. On some architectures might use
faster instruction that computes both values in one shot.
11 years ago
Vladimír Vondruš
127f34b657
Math: fix typedef shadowing.
11 years ago
Vladimír Vondruš
eac01167f5
MSVC 2015 compatibility: except long double (de)normalization to fail.
...
I'm giving up on this one also for 2015. Cherry-picked from
compatibility branch (6ee931b7b492c12cd6674c93564617c7139cea84).
11 years ago
Vladimír Vondruš
a58121e893
Math: added div() function.
11 years ago
Vladimír Vondruš
c71dc12503
Making test declarations more compact.
...
Yet again I experienced how insanely large this thing got over the
years.
11 years ago
Vladimír Vondruš
6488fe6e75
Oh, it's 2015 already.
11 years ago
Vladimír Vondruš
c56940993b
Use the new math constants throughout the code.
12 years ago
Vladimír Vondruš
64a02d68db
Math: document more non-obvious tricks.
12 years ago
Vladimír Vondruš
a8199340fb
Math: fixed confusing naming.
...
Probably was byte vector originally, but isn't anymore.
12 years ago
Vladimír Vondruš
6f0ba96cb6
Happy new year too.
12 years ago
Vladimír Vondruš
0616f24f34
Making includes absolute, part 5: absolute includes everywhere.
...
The only places where they aren't absolute are:
- when header is included from corresponding source file
- when including headers which are not part of final installation (e.g.
test-specific configuration, headers from Implementation/)
12 years ago
Vladimír Vondruš
8c2291aa49
Making includes absolute, part 4: using absolute includes for Corrade.
...
Also adapted to some Corrade renames.
12 years ago
Vladimír Vondruš
45a10cefdf
Making includes absolute, part 1: moving files around.
...
Everything what was in src/ is now in src/Corrade, everything from
src/Plugins is now in src/MagnumPlugins, everything from external/ is in
src/MagnumExternal. Added new CMakeLists.txt file and updated the other
ones for the moves, no other change was made. If MAGNUM_BUILD_DEPRECATED
is set, everything compiles and installs like previously except for the
plugins, which are now in MagnumPlugins and not in Magnum/Plugins.
12 years ago
Vladimír Vondruš
282ee58c62
Math: work around missing std::round() in NaCl newlib.
...
Also test that our implementation behaves the same.
13 years ago
Vladimír Vondruš
4059bd752f
Math: added minmax() and Vector2::minmax().
...
No Vector<size, T> and std::initializer_list versions yet, as the
algorithm for it is pretty complicated and I'm not sure that they will
be used frequently enough to deserve their existence.
13 years ago
Vladimír Vondruš
f009e5c47f
Math: added rounding functions.
13 years ago
Vladimír Vondruš
186c522fe5
Math: added lerpInverted().
13 years ago
Vladimír Vondruš
5787d66d45
Math: test also vector as interpolation phase in Math::lerp().
13 years ago
Vladimír Vondruš
31ce072f39
Math: added initializer list overloads for min() and max().
...
Hopefully including <algorithm> doesn't do much harm to compilation
time.
13 years ago
Vladimír Vondruš
f6ae87376b
Math: added function fma().
13 years ago
Vladimír Vondruš
6124ad3c27
Math: added sqrtInverted() function.
...
There are SIMD instructions for that, so why not have it in place.
13 years ago
Vladimír Vondruš
5e8606a755
Math: added sign() function.
13 years ago
Vladimír Vondruš
d95c44fcc8
Math: test that trigonometric functions work with Unit base class.
...
The test fails.
13 years ago
Vladimír Vondruš
83bda8bbe6
Math: fixed test for denormalize<UnsignedLong, long double>().
...
Amazing what single forgotten literal can do.
13 years ago
Vladimír Vondruš
35eb876303
Various other compilation fixes for OpenGL ES target.
13 years ago
Vladimír Vondruš
4744b631bb
Math: test pow() constexpr.
13 years ago
Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
90a60ce7e9
Math: disable denormalize() test for UnsignedLong.
...
It works with GCC and -O3, but fails on unoptimized code.
13 years ago
Vladimír Vondruš
231f3277ab
Adapted to Corrade changes.
...
Allowing to instantiate Trade::AbstractImporter subclasses directly
without plugin manager.
13 years ago
Vladimír Vondruš
6a90b0231b
Math: using new aliases for builtin types in whole Math namespace.
13 years ago
Vladimír Vondruš
5ff0e29950
Math: fix warning about literal types in normalize().
...
C++11 changed type of character literal (i.e. '\x7F') from int to char,
thus the documentation is wrong (also mistakenly used octal literal).
Added test to properly test the behavior.
13 years ago
Vladimír Vondruš
c2f4359bd7
Math: added strongly-typed asin(), acos() and atan().
13 years ago
Vladimír Vondruš
c0a5e5dadd
Math: added sin(), cos() and tan() accepting either Rad or Deg.
13 years ago
Vladimír Vondruš
fec6822187
Math: added sqrt() scalar/vector overload.
13 years ago
Vladimír Vondruš
0144c38a54
Math: moved lerp() from Vector to Functions.h.
...
It does nothing special for vectors (unlike e.g. quaternion LERP) and
scalar overload is useful too.
13 years ago