def assertAlmostEqualAngles(self, x, y,):
c2 = (sin(x) - sin(y)) ** 2 + (cos(x) - cos(y)) ** 2
angle_diff = acos((2.0 - c2) / 2.0)
Would like to have more explanation about why we are doing this (like (sin(x) - sin(y)) ** 2 + (cos(x) - cos(y)) ** 2, what does this mean?)
Could you elaborate more on what you don’t understand exactly?
- You think the math formula is incorrect?
- You don’t understand how the math formula was translated to Python code?
Not quite understand the physical meaning of these 2 formula.
They are scientific calculations…we may not understand them but they work. For this course, we just need to know how to use them.