duohedounai / duohedounai.github.io

0 stars 0 forks source link

Calculate the Angle Between Two Vectors in Python | Will Yuan's Blog #29

Open duohedounai opened 1 month ago

duohedounai commented 1 month ago

https://duohedounai.github.io/2024/05/27/calculate-the-angle-between-two-vectors/

Formula Given vectors AB⃗\vec{AB}AB and CD⃗\vec{CD}CD, A=(x1,y1)A=(x_1,y_1)A=(x1​,y1​), B=(x2,y2)B=(x_2,y_2)B=(x2​,y2​), C=(x3,y3)C=(x_3,y_3)C=(x3​,y3​), D=(x4,y4)D=(x_4,y_4)D=(x4​,y4​), then: AB⃗=(x