How to calculate in JavaScript angle between 3 points? [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I want to get angle between 3 points in JavaScript. If I have points A(x1,y1), B(x2, y2), C(x3, y3) I want to get angle that is formed with lines AB and BC. let A = {x:x1, y:y1}, B = {x:x2, y:y2}, C = {x:x3, y:y3} 回答1: Try this function : /* * Calculates the angle ABC (in radians) * * A first point, ex: {x: 0, y