5 /* Return scalar product */
7 vect_pscal(vect_t *v, vect_t *w)
9 return v->x * w->x + v->y * w->y;
12 /* Return Z of vectorial product */
14 vect_pvect(vect_t *v, vect_t *w)
16 return v->x*w->y - v->y*w->x;
19 /* Return scalar product */
21 vect_pscal_sign(vect_t *v, vect_t *w)
30 /* Return Z of vectorial product */
32 vect_pvect_sign(vect_t *v, vect_t *w)
41 /* norm of a vector */
45 return sqrt(v->x*v->x+v->y*v->y);
50 void vect_rot_trigo(vect_t *v)
59 void vect_rot_retro(vect_t *v)
69 float vect_get_angle(vect_t *v, vect_t *w)
74 ps = vect_pscal(v, w);
75 n = vect_norm(v) * vect_norm(w);
77 return acos((float)ps/n);