Matthias Grob
740324cf1e
Make all array constructors explicit ( #99 )
...
* Make all array constructors explicit
to avoid accidental implicit casts like e.g.
Vector3f v = 0;
assigning nullpointer content.
5 years ago
Julian Kent
7b34c1c51d
Enable branch coverage
5 years ago
Matthias Grob
973999a4d3
Fix some template type conversions and style
6 years ago
Matthias Grob
c34e8dc98f
helper: consider matrices with the same NANs and INFINITYs equal
...
to simplify bulk checks when these values are expected
6 years ago
Matthias Grob
bbaa93880b
helper: consider NAN equal to NAN such that vectors can be compared exactly
6 years ago
Matthias Grob
33a629105c
Matrix: add proper print function testing
...
Before the print function was just implicitly called somewhere
and that's why we had 100% line coverage. With this we have actual
testing of the functions.
6 years ago
Matthias Grob
b0b7d7229a
Multiplication test: fix division resulting in NAN
6 years ago
Matthias Grob
3747232724
LeastSquaresSolver: Fix nasty GCC compile optimization error
...
The original implementation with no wrapping on size_t is more readable
but the compiler errors with:
internal compiler error: in trunc_int_for_mode, at explow.c:55
I read up and it's apparently a loop optimization problem.
Inspired by https://stackoverflow.com/a/27224697/6326048
I used a far less readable implementation that works fine and
wrote a comment to explain it.
6 years ago
Matthias Grob
5844b0e46e
Implement one float equality check and use it everywhere
6 years ago
Matthias Grob
1e80807e8e
test: Add uncovered equality checks with NAN and INFINITE
6 years ago
Matthias Grob
a374f37a54
Include helper_functions like all other library components
6 years ago
James Goppert
60c9c99dcc
Fix type for division.
6 years ago
Julian Kent
b4714e2ed2
Don't lose array sizes in copyTo
6 years ago
Julian Kent
51d2f9f0dc
Remove direct access to internal data
6 years ago
Julian Kent
18218c8f9c
Test non-square matrix multiplication ( #91 )
...
* Test non-square matrix multiplication
6 years ago
Julian Kent
b817e8677d
Add helpers based on Slice: row(), col(), xy()
6 years ago
Julian Kent
82d565f4d9
Add support for Slice to Matrix, SquareMatrix, Vector
6 years ago
Julian Kent
af1378cc55
Add Slice class
6 years ago
Julian Kent
15865b741c
Help compiler with name resolution to avoid overload mixups
6 years ago
Julian Kent
03ffd696a6
Replace pow with sqrt
6 years ago
Julian Kent
22bf63cb71
A smaller codesize wrap, since it gets inlined in many places
6 years ago
Matthias Grob
74ace7d1d5
helper test: cover wrap close to limits cases ( #84 )
6 years ago
Tanja Baumann
26fd962cbe
fix bug in matrix wrap function ( #83 )
6 years ago
Julian Kent
4a4309327a
better API comment
...
Co-Authored-By: Julian Oes <julian@oes.ch>
6 years ago
Matthias Grob
31450c407c
Matrix: use existing print() if isEqual test fails
6 years ago
Matthias Grob
938274fce5
helper test: add extensive wrap tests
6 years ago
Matthias Grob
315010bae1
helper_functions: generalize wrap function to any range
6 years ago
Matthias Grob
007c7c58c4
fix math defines to have M_PI and M_TWOPI
6 years ago
Martina Rivizzigno
cc084e0791
matrix: add method to check all values are nan ( #82 )
6 years ago
kritz
84b3da227c
Canonical Quaternion with tests ( #81 )
6 years ago
Matthias Grob
56b069956d
slice test: fix trailing whitespace style
6 years ago
Oskar Weigl
5ccfa74c72
Fix const error
6 years ago
Oskar Weigl
eea6b59973
Implement slice as copy loop
6 years ago
Oskar Weigl
93375fbd3c
Fix copy-paste error
6 years ago
Oskar Weigl
5872bbc28c
Add slicing tests that are not pure row slicing
...
I had a look at the implementation of `slice`, and I found it odd that it doesn't have a copy loop. The current implementation does a raw memcpy of the underlying contiguous row-major data. As far as I can tell, this could only slice along rows. Interestingly, I found that the tests only tested for slicing along rows, so this bug would go unnoticed.
I added some tests that checks slicing along columns also. I have a feeling this would break, and we need to fix the implementation of `slice`. However I could be wrong, and hence I'm submitting these tests first to verify.
6 years ago
TSC21
ec436d5aee
define FLT_EPSILON; be descriptive about upper_right_triangle() method
6 years ago
TSC21
7355a29a2a
tests: use __FLT_EPSILON__ in comparisons
6 years ago
TSC21
7ab2b24e65
tests: urt: refactor
6 years ago
TSC21
4aab44fe01
Travis CI: update MacOS version to use
6 years ago
TSC21
707967d117
add test to .urt()
6 years ago
TSC21
210c76c04b
add test to setNaN()
6 years ago
TSC21
96cb9ab146
add NaN value set for Matrix; add return of URT of a matrix
6 years ago
Daniel Agar
6b0777d815
stdlib_imports cinttypes currently unavailable in NuttX toolchain ( #79 )
6 years ago
Matthias Grob
18fba8221c
quaternion: improve comments
6 years ago
Matthias Grob
a4f39c0f89
quaternion: reuse existing dot product
6 years ago
Matthias Grob
9c0acfba36
Matrix: remove unsafe copyToRaw method
...
It used a pointer and could therefore not do correct type checking
for index out of bound or struct memebr order.
Has to be considered unsafe and bad practise.
We should switch to arrays as representation for vectors
inside the messages instead of foo_x, foo_y, foo_z fields.
6 years ago
Beat Küng
0d3bff5e00
Vector2: add explicit constructor for Vector3
...
Initialize from the first 2 elements.
6 years ago
Beat Küng
807472bfd7
README: document how to run tests
6 years ago
Bart Slinger
30d5a79432
testing float/double with Type template
7 years ago
Bart Slinger
707e288019
explicit casting
7 years ago