Compute the angle between two vectors from their components using θ = arccos(a·b/(|a||b|)), returned in both radians and degrees.
输入两向量的分量,求夹角。
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Angle between vectors | cos θ = (a·b)/(|a||b|) | Analytic geometry |
| Dot product | a·b = Σaᵢbᵢ | Vector algebra |
| Norm | |a| = √(a·a) | Euclidean norm |
| Range | 0–180 degrees | Geometric definition |
| Orthogonality | a·b = 0 means perpendicular | Vector algebra |
| Radians | 1 rad = 180/π degrees | Angle units |