Question: I have 2 objects and when I move one, I want to get the angle from the other.

For example:

```
Object1X = 211.000000, Object1Y = 429.000000
Object2X = 246.500000, Object2Y = 441.500000

```

I have tried the following and every variation under the sun:

```
double radians = ccpAngle(Object1,Object2);
double degrees = ((radians * 180) / Pi); 

```

But I just get 2.949023 returned where I want something like 45 degrees etc.

Answer: 
[Tomas' answer](https://stackoverflow.com/a/6065003/4691224) in **Swift 5.1**

```
func angle(between starting: CGPoint, ending: CGPoint) -> CGFloat {
    let center = CGPoint(x: ending.x - starting.x, y: ending.y - starting.y)
    let radians = atan2(center.y, center.x)
    let degrees = radians * 180 / .pi
    return degrees > 0 ? degrees : degrees + degrees
}

```
There is no angle between two points. If you want to know the angle between the vectors from the origin (0,0) to the objects, use the scalar (dot) product:

```
theta = arccos ( (veca dot vecb) / ( |veca| * |vecb| )

```

The math std lib of the language your are using surely provides functions for arcus cosine, scalar product and length.