How :Dot work with Acos?

My definitons on what Acos, Dot means:

  • Acos is used to find the angle when you have the sides (Adjacent/Hypothenus).
  • Dot is used to compared how angles are alike to each other, and find the angle.

My Question: How does Acos work with Dot, when they are both used to find angles?
If Possible can you provide an example? Thank you.

  • Example of somewhere it was used:
    to rotate a 2d arrow based off a worldPoint.
Calculate the angle.
	--We assume the default arrow position at 0° is "up"
	local angle = math.deg(math.acos(Normalized2dDirection:Dot(cam.CFrame.UpVector)))

The dot product of vectors A and B can actually be represented by a triangle:
image
From which you can see why Acos would apply.

1 Like

Just know that if you take advantage of the geometric definition of the dot product, you lose the ability to tell the direction in a sense. If you want to know what side it is on it takes a bit more code but atan2 works.