|
|
Am 19.08.2013 03:23, schrieb Bald Eagle:
> ARrrrrrgh.
> I would have thought that VangleD( <0, 0, 0>, <8, 8, 0>) would return 45
> degrees.
> Instead it returns 90.
> VangleD( <8, 0, 0>, <8, 8, 0>) returns 45 degrees.
>
> So, it's not the angle between the "vectors" that it returns, but the angle
> formed by the Vector described by the two points, and an axis?
Well, I guess I'll resort to my standard answer again: "Um... no, not
really." :-)
Note that <0,0,0> has no direction, so the angle between it and any
other given vector is poorly defined. The function has to return
/something/, and it decides to return 90 because it's just as good or
bad as any other answer in that situation.
You can interpret the function in two ways:
(i) The function gives the angle between two direction vectors; to
understand what the angle between two vectors is, imagine both vectors
to be in the same plane (you can easily do this with any direction
vector because by definition a direction vector has no associated
location in space, just the direction and magnitude); the angle between
the two vectors is the rotation in that common plane that, when applied
to A, will reorient it to be collinear with vector B.
(ii) The function gives the angle between two location vectors; this is
equivalent to drawing two rays from the origin, one through each of the
points defined by the location vectors A and B, and - in the plane
defined by those two points and the origin - measuring the angle between
the two rays.
Post a reply to this message
|
|