Sam Hocevar
37837ebdf1
Prepare files and project for LD33.
9 years ago
Sam Hocevar
155dc4af14
Work around an apparent Visual Studio compiler bug.
9 years ago
Guillaume Bittoun
3f6cd5b120
polynomial: accuracy improvement on double root in order 3
9 years ago
Guillaume Bittoun
51d8ed6458
polynomial: Improving tests for double/triple roots in order 3
9 years ago
Sam Hocevar
fd25e64d5c
lolunit: explicitly cast lolunit_assert_doubles_equal() arguments to double.
9 years ago
Sam Hocevar
75035be227
math: fix epsilon in some double equality unit tests.
9 years ago
Sam Hocevar
d332ad0f6f
math: add unit tests to check that radians(90) == radians(90.0).
9 years ago
Sam Hocevar
41af385a4c
math: degrees() and radians() return floating point even with integer arguments.
This avoids silly mistakes when calling radians(180) instead of
radians(180.0). The first one used to return 3 instead of 3.14159…
9 years ago
Sam Hocevar
078751a820
math: all API functions dealing with angles now use radians.
We already have the convenient degrees() and radians() functions to convert
between angle formats. This commit involves a lot of refactoring here and
there and I may have missed some places where conversions were needed. But
hopefully there aren’t may such places.
9 years ago
Sam Hocevar
45b57cc102
math: rename re() to inverse() in all classes.
The name “re” came from “reciprocal” but since we have “inverse” for
matrices, I thought it would be nice to make everything consistent.
9 years ago
Sam Hocevar
5a15c90fcc
math: add SQT inverse method.
9 years ago
Sam Hocevar
d618053d00
math: add composition of SQT transforms and the corresponding unit tests.
9 years ago
Sam Hocevar
45b792cc8e
test: refactor some stuff in the unit tests because I like it better that way.
9 years ago
Sam Hocevar
7166760eaf
math: add a new sqt type for scale/rotation/translation transforms.
9 years ago
Sam Hocevar
4a968ad27e
base: don’t prefix variable names with ‘_’.
9 years ago
Sam Hocevar
a69a086c01
scene: move old Line and Tile API to child structures.
9 years ago
Sam Hocevar
861568b146
misc: some cleanup in files, including UTF-8 BOM.
9 years ago
Sam Hocevar
3eb7db5e4d
tileset: rename AddTile() to define_tile().
This is to avoid confusion with Scene::AddTile().
9 years ago
Sam Hocevar
ccc1741023
scene: minor optimisation in Scene::AddTile().
9 years ago
Sam Hocevar
6f1b4353a8
scene: make the sprite tile API use matrices internally.
The old public API is maintained for now but should be considered
deprecated.
9 years ago
Sam Hocevar
103f60d48b
misc: replace NULL with nullptr in most places.
9 years ago
Sam Hocevar
5ea13fc857
scene: clean up a few things here and there.
9 years ago
Sam Hocevar
441a20af99
misc: fix copyright information here and there.
9 years ago
Sam Hocevar
19e52b4754
bullet: remove some ugly compilation warnings.
9 years ago
Sam Hocevar
38733fade7
math: move the matrix-to-quaternion code to a global header.
This lets us use the code for non-float variable types. I also got
rid of the mat4-to-quat code so that users are forced to use the
mat3-to-quat code and possibly discover places where their code is
suboptimal.
9 years ago
Sam Hocevar
977049a7b3
math: make the matrix-to-quaternion code shorter.
9 years ago
Sam Hocevar
74d2ce93fe
polynomial: compute u_norm and v_norm directly and use cbrt() instead of pow(x,1/3).
9 years ago
Sam Hocevar
d9b37a0c8d
math: add lol::cbrt as a direct alias to std::cbrt.
9 years ago
Lolbot
78b1319e2a
fixed 18 files out of 4242:
- removed 0 CR characters
- removed 12 trailing whitespaces
- replaced 0 tabs with spaces
- fixed 15 svn:eol-style properties
9 years ago
Sam Hocevar
5d0eec893e
math: some more simplifications.
9 years ago
Sam Hocevar
ddf9354b67
math: simplify some computations in the degree-3 root finder.
9 years ago
Sam Hocevar
e0698e9600
math: do not use floats in the polynomial root finding.
9 years ago
Guillaume Bittoun
efa94fa2e9
polynomial: adding test with bigger solutions
9 years ago
Guillaume Bittoun
aa2ec71ae4
polynomial: 3rd order fixes
9 years ago
Guillaume Bittoun
93dc8a70a7
polynomial: 3rd order solving v1.0
9 years ago
Guillaume Bittoun
a327a68478
polynomial: 3rd order, almost done. Needs accurate tests
9 years ago
Guillaume Bittoun
1c93dabbad
polynomial: more 3rd order fixes
9 years ago
Guillaume Bittoun
26ec1481d3
polynomial: bunch of fixes for 3rd order
9 years ago
Guillaume Bittoun
c55f25f821
drafting polynomial 3rd order solving. To be continued…
9 years ago
Sam Hocevar
7b3a4ca3b2
thonik: add some cool sprites to a new project.
9 years ago
Sam Hocevar
6ffaca4bbd
engine: move some files around.
9 years ago
Sam Hocevar
acef0b216f
math: fix a refactoring blunder.
9 years ago
Benjamin ‘Touky’ Huet
6ab67e8f86
btPhysTest is working again, but it still has 7 Ticker::Unref(Shader) that should be there ......
9 years ago
Benjamin ‘Touky’ Huet
3b00a2e5ee
Added Joystick count
9 years ago
Sam Hocevar
d64b117b8d
build: fix license and copyright information.
9 years ago
Sam Hocevar
508556c0a0
sys: get rid of threadbase.h.
Merge threadbase.h into thread.h since we no longer need to have “secret”
thread implementations; all the platforms we care about have std::thread
or just don’t support threads at all.
9 years ago
Sam Hocevar
144cb0df31
sys: get rid of pthreads.
Since C++11 threads are available on every platform that has threads, we
no longer need our pthread implementation. The LOL_FEATURE_CXX11_THREADS
macro is gone, too, and we now just use LOL_FEATURE_THREADS.
Note that it is still necessary to link with -lpthread or -pthread on
some platforms, so we don’t throw that part away.
9 years ago
Sam Hocevar
ccf5f53825
misc: various mingw cross-compilation fixes.
Add mingw-std-threads project to external/ for full C++11 thread support, fix
an incorrect Win32 fix I did in PEGTL, work around mingw’s <io.h> declaring a
conflicting eof symbol, and fix a capitalisation error in log.cpp.
9 years ago
Sam Hocevar
6cd7d00b6e
base: don’t use the %lld format string specifier.
The C++ standard (21.5 Numeric conversions) says that %lld must be available,
however mingw still does not support it and in the meantime the most practical
solution seems to use long int instead of long long int.
9 years ago
Sam Hocevar
51b4210361
base: reintroduce array::swap.
It merely performs an std::swap() on both array elements, but it’s
apparently convenient to have.
9 years ago