docs: update math API docs

This commit is contained in:
2026-03-20 02:35:15 +08:00
parent e165dbea1c
commit c5b17239ca
243 changed files with 5307 additions and 1327 deletions

View File

@@ -4,7 +4,7 @@
static float Dot(const Vector2& a, const Vector2& b)
```
计算两个 2D 向量的点积。
计算两个 2D 向量的点积。点积结果可用于判断两个向量的方向关系:正值表示夹角小于 90°零表示垂直负值表示夹角大于 90°。
**参数:**
- `a` - 第一个向量
@@ -12,6 +12,10 @@ static float Dot(const Vector2& a, const Vector2& b)
**返回:** `float` - 点积结果 a.x * b.x + a.y * b.y
**线程安全:**
**异常:** (无)
**复杂度:** O(1)
**示例:**
@@ -21,3 +25,8 @@ Vector2 a(1.0f, 0.0f);
Vector2 b(0.0f, 1.0f);
float dot = Vector2::Dot(a, b); // 0.0f
```
## 相关文档
- [Vector2](vector2.md) - 返回类总览
- [Cross](Cross.md) - 叉积运算