The method `BABYLON.Angle.BetweenTwoPoints`

seems to have been written for two 2D points given by position vectors, hence the name rather than `BABYLON.Angle.BetweenTwoVectors`

. Unfortunately however it was intended it does not work.

Let A and B be two points, in the 2D Cartesian plane, with position vectors ** a** and

**as in the diagram below**

*b*The angle between ** a** and

**is the red one.**

*b*The calculation for

```
BABYLON.Angle.BetweenTwoPoints(a, b);
```

uses

```
var delta = b.subtract(a);
var theta = Math.atan2(delta.y, delta.x);
return new Angle(theta);
```

and unless I am missing something this results in the green angle not the red angle.

I would suggest the correct calculation, giving the angle between 0 and Ļ is

```
var theta = Math.acos(Vector2.Dot(a.clone().normalize(), b.clone.normalize()));
return new Angle(theta)
```

This would then work as Angle.BetweenTwoVectors and could work for Vector3s