Vector3 point1 = new Vector3(1, 0, 0); Vector3 point2 = new Vector3(0, 1, 0); float angle = point1.AngleTo(point2); Console.WriteLine(angle); // Output: 90
Point3D point1 = new Point3D(1, 0, 0); Point3D point2 = new Point3D(0, 1, 0); double angle = point1.AngleTo(point2); Console.WriteLine(angle); // Output: 1.570796326794897
Vector point1 = new Vector(1, 0); Vector point2 = new Vector(0, 1); double angle = Vector.AngleBetween(point1, point2); Console.WriteLine(angle); // Output: 90In this example, we create two points in a 2D space using the Vector class. We then use the AngleBetween method to calculate the angle between the two points, which is 90 degrees. Package/Library: PresentationCore (part of .NET Framework)