Remove unused include
The cross product is only defined for 3D vectors. Instead of checking the sizeat runtime, only provide an implementation for N==3. Trying to use the crossfunction with other vector sizes will then result in a link error.
Merge pull request #19 from gvissers/master
Cleanup of quaternion code
Excessive parentheses only make the expressions hareder to read.
Replace use of float by double.
All values in a quaternion are declared double, let's not lose precision onplatforms where double is larger than float.
Simplify a few more functions, and pass vector arguments by reference
Simplify constructors
Simplify several functions by replacing the body with one-line calls to theconstructor. Furthermore, pass Quaternion arguments by reference to avoidexcessive copying.
Quaternion needs the definition of a matrix. Include it.
Fix conversion of impure rotation matrices to quaternions
The test for the largest element in the matrix diagonal was reversed, whichresulted in taking the square root of a negative value for matrices withdeterminant less than zero.
Store determinant as double when computing matrix inverse. Does not matter on Arduino, but might on other platforms.
Merge pull request #18 from gvissers/master
Fixes for matrix utility code
The recursive definition of the determinant function, combined with the factthat no specialized function for the base case N==1 is given, leads toinstantiation of this function for all 256 possible values of a uint8_t (eventhough these are not used in practice). Fix this by providing an explicit...
Remove inclusion of unused headers
Fix calculation of inverse. We should divide by the determinant instead of multiply with it.
Fix minor_matrix() accessing data past end of array.
Get rid of superfluous _cell member
Use more standard (i, j) index names and constify transpose()
Prevent copying row data for every element in matrix multiplication.
Dox matrix addition, subtraction, and scalar multiplication using a single loop instead of a double loop.
make row and column retrieval function const, pass Vector arguments to row and column setters as const reference
Use a single loop to copy matrices
Add functions for reading elements of constant matrix
Fix memset() in constructors writing past end of data
Include vector.h, so that including just matrix.h will pull in the requested dependencies
« Previous 1 2 3 4 5 6 Next » (76-100/148) Per page: 25, 50, 100
Also available in: Atom