Statistics
| Branch: | Revision:

adafruit_bno055 / utility / vector.h @ 651c5f56

History | View | Annotate | Download (4.889 KB)

# Date Author Comment
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.

b2d499c7 2015-05-21 22:15 Paul Du Bois (laptop)

Remove unnecessary double* pointer from Vector<N>

The pointer prevents the use of bitwise move/copy/initialize operations
on Vector(). Less importantly, it's an unnecessary memory bloat.

abce6607 2015-05-21 22:15 Paul Du Bois (laptop)

Bug fix for Vector::magnitude()

Sample failure: Vector<1>(0.5).magnitude() returns 1, not 0.5.
The avoid-sqrt optimization is dubious at best, and should arguably
just be removed.

0695bf91 2015-05-21 22:15 Paul Du Bois (laptop)

Add "const" to non-mutating Vector, Quat methods

Also adds some clarifying documentation, since the quat->euler axis
conventions are a bit surprising.

d964148c 2015-05-01 20:30 Tony DiCola

Switch from dynamic memory to stack allocated memory for imumath types, add TinyWireM support, make indentation consistent.

4bc1c0c1 2015-04-05 01:45 Kevin Townsend

First commit