0

I want to calculate the angle between a vector3d and other vectors3d in 360 degrees

I have tried this with vector3d.AngleBetween but this gives results in 180 degrees

//Create a new 3d vector from average points
Vector3D vector1 = new Vector3D(averageX, averageY, 0);

//Create reference vector
Vector3D vector2 = new Vector3D(averageX-100, averageY, 0);
Vector3D vectorResult1 = new Vector3D();

vectorResult1 = vector2 - vector1;                       

//Other vector to all points in layer
foreach (XYZ d1 in coord)
 {                                
   Vector3D vector3 = new Vector3D(d1.X, d1.Y, d1.Z);
   Vector3D vectorResult2 = new Vector3D();

   vectorResult2 = vector3-vector1;

   //Define a rotation

   double angleBetween = Vector3D.AngleBetween(vectorResult2, vectorResult1);
 }
vanlion
  • 111
  • 8

1 Answers1

0

I you have a look at the documentation you'll see that Signed angles do not extend into 3-D space, so an angle between 0 and 180 degrees is returned.. It's in the Remarks.

René R
  • 116
  • 2