Statistics
| Branch: | Revision:

adafruit_bno055 / utility @ 45477cdd

Name Size
imumaths.h 881 Bytes
matrix.h 4.951 KB
quaternion.h 6.503 KB
vector.h 4.808 KB

Latest revisions

# Date Author Comment
b5582106 2016-03-08 14:58 Gé Vissers

Add attribution line for fixes in utility code

3cae40b9 2016-03-04 13:53 Gé Vissers

It makes no sense to return 0 for the vector norm when the vector contains
NaNs. Just return NaN instead, Furthermore don't refuse to normalize vectors
when the length is small. Unless the length really is zero, it should be safe
to scale with the inverse length.

3e12eaa8 2016-03-04 11:45 Gé Vissers

Unless all vector length are very close to unity, trying to avoid taking a
square root only slows things down (at least on x86_64 and Arduino Uno).

651c5f56 2016-02-26 17:37 Gé Vissers

limit scope of loop variable

a61c970f 2016-02-26 15:38 Gé Vissers

Fix use of abs() function with float argument.

The abs() function in stdlib.h takes an integer argument. Passing it a float
will silently convert the argument to int, and take the absolute value of the
result. Hence, abs(0.99) == 0, which is not what was intended. Use fabs instead.

d7b28532 2016-02-26 15:34 Gé Vissers

make member functions const where appropriate, and pass vectors by reference

a6c06c10 2016-02-26 15:33 Gé Vissers

Remove unused include

fd9de024 2016-02-26 13:20 Gé Vissers

The cross product is only defined for 3D vectors. Instead of checking the size
at runtime, only provide an implementation for N==3. Trying to use the cross
function with other vector sizes will then result in a link error.

7ede6000 2016-02-25 16:04 Gé Vissers

Excessive parentheses only make the expressions hareder to read.

2dd31024 2016-02-25 15:45 Gé Vissers

Replace use of float by double.

All values in a quaternion are declared double, let's not lose precision on
platforms where double is larger than float.

View revisions

Also available in: Atom