My email: igor.veselic@email.si
In file hpoint_nd.h (From online reference manual).
00548 /* * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * *
00549 Routine: angle --- the angle between
two control points
00550 The angle between two control points
00551 Input: a --> the first vector
00552 b --> the second vector
00553 Output: the angle in radians between
the two points
00554 Restrictions:
00555 author Philippe Lavoie (24 January 1997)
00556 Modified by:
00557 * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * */
00558 template <class T, int D>
00559 inline T angle(const HPoint_nD<T,D>& a,const
HPoint_nD<T,D>& b) {
00560 if(b==0 || a==0 )
00561 return 0 ;
00562 return dot(a,b)/norm(a)/norm(b) ;
00563 }
The function does not return the angle between
vectors a and b, but cosine of that angle.