victor

What does out-> = a-> y * b -> z - a-> z * b-> y

Yes.

Ludorum

42

vectors are x = (1 -5 0), y = (0,1,0) z = (0,0,2)

the vectors are formed from the output of one minimu 9. I do not understand that what you do:

void L3G::vector_cross(const vector a,const vector b, vector out)
{
out->x = a->y
b->z - a->z
b->y;
out->y = a->z
b->x - a->xb->z;
out->z = a->x
b->y - a->y*b->x;
}

float L3G::vector_dot(const vector a,const vector b)
{
return a->x
b->x+a->y
b->y+a->z*b->z;
}

void L3G::vector_normalize(vector *a)
{
float mag = sqrt(vector_dot(a,a));
a->x /= mag;
a->y /= mag;
a->z /= mag;

victor80:
I do not understand that what you do:

In case you haven't figured it out from all the meaningless replies you've got, your post is incomprehensible and we have no idea what your question is about.

If you actually do have a question, please ask it in plain English without assuming we know anything about your problem or your subject area.

The question relates to a magnetometer library, but I have no idea what the question is.

out->x = a->yb->z - a->zb->y;

out is a pointer to an object of type vector. The type has members x, y, and z. To access those members (dereference the pointer), the -> symbol is used.

a and b are also pointers to objects of type vector.

The method is getting data from the x, y, and z members of the instances a and b, performing some arithmetic, and storing the results in the x, y, and z members of out.