[vnl] angle(a,b) now returns acos( a.b / |a||b| ), but is not
instantiated for complex-valued vectors, since we lack an
implementation for acos(complex).
Amitha.
On Mon, Oct 29, 2001 at 03:03:29PM -0500, Amitha Perera wrote:
> > Apparently this is meant to give "symmetric" output, i.e.,
> > angle(a,b) == angle(b,a).
>
> By definition of the cos_angle, it is already symmetric:
> cos_angle(a,b) = cos_angle(b,a) = a.b/(|a||b|). The current
> implementation gives
>
> ^
> /
> /
> A / B
> <--------/.....
>
> B as the "angle", which is the smallest angle provided the "vectors"
> are undirected. Is this what is intended? I think it should simply be
> acos( a.b / |a||b| )
> since that is what most people refer to as the angle between two
> vectors.
>
> Amitha.
|