int vector_dot_product (vector_t* v1, vector_t* v2) { //return (v1->x * v2->x + v1->y * v2->y + v1->z * v2->z); return mulfx(v1->x, v2->x) + mulfx(v1->y, v2->y) + mulfx(v1->z, v2->z); }
int vector_cross_product_z (vector_t* v1, vector_t* v2) { //return ((v1->x * v2->y) - (v1->y * v2->x)); return mulfx(v1->x, v2->y) - mulfx(v1->y, v2->x); }
void vector_scalar(vector_t *v, int s, vector_t* r) { r->x = mulfx(v->x, s); r->y = mulfx(v->y, s); r->z = mulfx(v->z, s); }