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 Cross(const Vector2& a, const Vector2& b)
```
计算两个 2D 向量的叉积(返回标量)。结果为正值表示 b 在 a 的逆时针方向。
计算两个 2D 向量的叉积(返回标量)。结果为正值表示 b 在 a 的逆时针方向,负值表示 b 在 a 的顺时针方向
**参数:**
- `a` - 第一个向量
@@ -12,6 +12,10 @@ static float Cross(const Vector2& a, const Vector2& b)
**返回:** `float` - 叉积结果 a.x * b.y - a.y * b.x
**线程安全:**
**异常:** (无)
**复杂度:** O(1)
**示例:**
@@ -21,3 +25,8 @@ Vector2 a(1.0f, 0.0f);
Vector2 b(0.0f, 1.0f);
float cross = Vector2::Cross(a, b); // 1.0f (逆时针)
```
## 相关文档
- [Vector2](vector2.md) - 返回类总览
- [Dot](Dot.md) - 点积运算