Guillaume Bittoun
3f6cd5b120
polynomial: accuracy improvement on double root in order 3
10 anos atrás
Guillaume Bittoun
51d8ed6458
polynomial: Improving tests for double/triple roots in order 3
10 anos atrás
Sam Hocevar
75035be227
math: fix epsilon in some double equality unit tests.
10 anos atrás
Sam Hocevar
d332ad0f6f
math: add unit tests to check that radians(90) == radians(90.0).
10 anos atrás
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.
10 anos atrás
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.
10 anos atrás
Sam Hocevar
5a15c90fcc
math: add SQT inverse method.
10 anos atrás
Sam Hocevar
d618053d00
math: add composition of SQT transforms and the corresponding unit tests.
10 anos atrás
Sam Hocevar
45b792cc8e
test: refactor some stuff in the unit tests because I like it better that way.
10 anos atrás
Sam Hocevar
861568b146
misc: some cleanup in files, including UTF-8 BOM.
10 anos atrás
Sam Hocevar
441a20af99
misc: fix copyright information here and there.
10 anos atrás
Guillaume Bittoun
efa94fa2e9
polynomial: adding test with bigger solutions
10 anos atrás
Guillaume Bittoun
93dc8a70a7
polynomial: 3rd order solving v1.0
10 anos atrás
Guillaume Bittoun
a327a68478
polynomial: 3rd order, almost done. Needs accurate tests
10 anos atrás
Guillaume Bittoun
1c93dabbad
polynomial: more 3rd order fixes
10 anos atrás
Guillaume Bittoun
26ec1481d3
polynomial: bunch of fixes for 3rd order
10 anos atrás
Guillaume Bittoun
c55f25f821
drafting polynomial 3rd order solving. To be continued…
10 anos atrás
Sam Hocevar
d64b117b8d
build: fix license and copyright information.
10 anos atrás
Sam Hocevar
03c17fcae4
base: clean up and refactor containers.
The containers no longer force the user to use the ptrdiff_t type for
size information. For convenience, size() now always returns an int,
and the size_s() method offers a way to handle arrays with more than
2 billion elements. Internally, we still use ptrdiff_t, though.
Since so much code had to be changed, I took the opportunity to get
rid of capitalised accessors for classes that are lowercase.
10 anos atrás
Guillaume Bittoun
b1e1f23b8f
matrix: using permutation and LU decomposition for determinant and inverse computing
10 anos atrás
Guillaume Bittoun
ace6e55975
matrix: adding permutation determinant
11 anos atrás
Guillaume Bittoun
ed2e6cd95a
matrix: using vec_t for permutation logic
11 anos atrás
Guillaume Bittoun
c30c60671b
matrix: adding permutation matrix computing
11 anos atrás
Sam Hocevar
d70027cc3e
test: ensure the LU-decomposition checks fail with GCC and -ffast-math.
11 anos atrás
Sam Hocevar
d8951b413a
math: disable unstable LU decomposition for matrix inversion.
11 anos atrás
Sam Hocevar
3d67ab7f23
test: check for NaN in LU decomposition results.
11 anos atrás
Sam Hocevar
9011c4a876
test: add more unit tests for matrix inversion.
11 anos atrás
Guillaume Bittoun
0e974f9109
matrix: using LU-decomposition for matrix inverse (losing precision unfortunately)
11 anos atrás
Guillaume Bittoun
f501d2e9a4
matrix: adding U-inverse function
11 anos atrás
Guillaume Bittoun
3cf7df7381
matrix: adding L-matrix inverse
11 anos atrás
Guillaume Bittoun
7c907f6f3e
matrix: determinant computing using LU-decomposition
11 anos atrás
Guillaume Bittoun
ebd15dbc0e
matrix: LU-decomposition, bug fixes + tests
11 anos atrás
Sam Hocevar
3835dc62e0
base: minor variable renaming.
11 anos atrás
Sam Hocevar
7330c2c8c2
math: move naive bigint multiplication to a static method and add unit tests.
11 anos atrás
Sam Hocevar
d92547bf3e
math: add bitwise operators for bigints, comparison operators, unary
plus and minus, subtraction, and a lot of unit tests.
11 anos atrás
Sam Hocevar
ec00776d61
math: start working on a bigint type, which will be the fundation
for the next implementation of large float numbers.
11 anos atrás
Sam Hocevar
5d9488182f
math: extract the gradient generator from simplex noise so that we
can reuse it for other noise implementations.
11 anos atrás
Sam Hocevar
b0b5bcc6fa
math: tweak simplex noise scale according to dimension.
11 anos atrás
Guillaume Bittoun
a815a788e6
simplex_interpolator: bug fix on negative values.
11 anos atrás
Guillaume Bittoun
959f68142d
simplex_interpolator: first working version of simplex_interpolator. Tested (with std::cout) for 2D, should work for higher dimensions.
11 anos atrás
Guillaume Bittoun
49e9971183
simplex_interpolator: adding std::cout test… for realz this time
11 anos atrás
Guillaume Bittoun
b65af37e7c
simplex_interpolator: compilation fixes + testing Interp function
11 anos atrás
Guillaume Bittoun
5dbff4b35c
simplex_interpolator: first (non-working) draft for complete interpolator process
11 anos atrás
Sam Hocevar
bb438b6252
math: fix a coding error in the polynomial division.
11 anos atrás
Guillaume Bittoun
6bd7142428
simplex_interpolator: sorting coordinates in regular basis + tests.
11 anos atrás
Sam Hocevar
369ce3f511
math: polynomial division.
11 anos atrás
Sam Hocevar
1eb5f9f361
math: add a roots() method to find polynomial roots for degrees 1 and 2.
11 anos atrás
Sam Hocevar
3916a44c58
math: add derive() method to polynomial and allow to call eval() with
polynomials as arguments so as to compose them together.
11 anos atrás
Guillaume Bittoun
a6e8434c66
simplex_interpolator: adding tests for simplex base matrix check.
11 anos atrás
Sam Hocevar
0668d0d5a6
math: add a factory for Chebyshev polynomials.
11 anos atrás