∠ 两向量夹角计算器(二维/三维)Angle Between Two Vectors Calculator (2D/3D)
输入两个二维或三维向量(如 1, 2, 3),用 cos θ = a·b /(|a||b|) 求夹角,给出角度、弧度、点积、两个向量的模,并判断是否垂直或平行。本地处理。Enter two 2D or 3D vectors (such as 1, 2, 3) to get the angle from cos θ = a·b / (|a||b|), in degrees and radians, with the dot product, both magnitudes and whether the vectors are perpendicular or parallel. Processed locally.
使用说明与常见问题How-to & FAQ
「两向量夹角计算器(二维/三维)」是什么?What is the Angle Between Two Vectors Calculator (2D/3D) tool?
输入两个二维或三维向量(如 1, 2, 3),用 cos θ = a·b /(|a||b|) 求夹角,给出角度、弧度、点积、两个向量的模,并判断是否垂直或平行。本地处理。Enter two 2D or 3D vectors (such as 1, 2, 3) to get the angle from cos θ = a·b / (|a||b|), in degrees and radians, with the dot product, both magnitudes and whether the vectors are perpendicular or parallel. Processed locally.
如何使用「两向量夹角计算器(二维/三维)」?How do I use the Angle Between Two Vectors Calculator (2D/3D) tool?
在「两向量夹角计算器(二维/三维)」中,填写「向量 a」、「向量 b」等参数,结果会随输入实时计算并显示在下方。In the Angle Between Two Vectors Calculator (2D/3D): Fill in "Vector a", "Vector b"; results are recalculated instantly as you type.
公式是什么?What is the formula?
cos θ = (a·b) ÷ (|a| × |b|),其中 a·b 是对应分量乘积之和,|a| 是分量平方和的平方根。θ 取 0° 到 180°。cos θ = (a·b) / (|a| × |b|), where a·b is the sum of the products of matching components and |a| is the square root of the sum of squares. θ is between 0° and 180°.
怎么判断垂直和平行?How are perpendicular and parallel detected?
点积为 0 时两向量垂直;cos θ 为 1 时同向平行,为 −1 时反向平行。The vectors are perpendicular when the dot product is 0, parallel in the same direction when cos θ is 1 and in opposite directions when it is −1.
可以输入几维?How many dimensions can I enter?
二维或三维都可以,两个向量的分量数必须相同。分量用逗号或空格分隔,括号会被忽略。2D or 3D; both vectors need the same number of components. Separate components with commas or spaces; brackets are ignored.
能举个计算实例吗?Can you show a worked example?
例如在「两向量夹角计算器(二维/三维)」中填 向量 a = 1, 0, 0,向量 b = 0, 1, 0,结果区显示:夹角 θ:90°;弧度:1.57079633 rad;点积 a·b:0;|a|:1;|b|:1;cos θ:0;关系:垂直(点积为 0)For example, entering Vector a = 1, 0, 0, Vector b = 0, 1, 0 in the Angle Between Two Vectors Calculator (2D/3D) gives: Angle θ: 90°; Radians: 1.57079633 rad; Dot product a·b: 0; |a|: 1; |b|: 1; cos θ: 0; Relation: Perpendicular (dot product 0)
有哪些选项可以调整?What options can I adjust?
「两向量夹角计算器(二维/三维)」的设置:「向量 a」默认 1, 0, 0;「向量 b」默认 0, 1, 0。每次生成结果都按当前设置处理。Settings in the Angle Between Two Vectors Calculator (2D/3D) — "Vector a" default 1, 0, 0; "Vector b" default 0, 1, 0. The result always uses the current settings.
计算精度如何?How precise are the results?
「两向量夹角计算器(二维/三维)」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The Angle Between Two Vectors Calculator (2D/3D) uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.
「两向量夹角计算器(二维/三维)」免费吗?需要注册吗?Is the Angle Between Two Vectors Calculator (2D/3D) free? Do I need an account?
「两向量夹角计算器(二维/三维)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Angle Between Two Vectors Calculator (2D/3D) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.