Get angle of two Vector3s

Hello community
Here is my situation in 2D Unity:
I have a linerenderer. The renderer has two points. I want the linerenderer to have a collider so baseically I make a collider that is big enough and then want to rotate the gameobject it is on by the angle PointA has to PointB.

So for example:
PointA = -10, -10, 0
PointB= 10, 10, 0
The angle between them is 45°
I wanted to use Vector3.Angle() to get this angle but it always returns a value that is almost 180°. Its never exactly 180° though.

So, does anybody have a solution to this problem and could also explain the reason for this angle-madness to me because I will probably need it again and would like to understand it :smiley:

Thanks in advance

The reason is because the Angle method measures the two vectors as if they were rays starting at the origin and going through the point given. Because 10,10 and -10,-10 are opposite each other relative to the origin the return from the method is 180 degrees.