Update API documentation and remove obsolete plan files
This commit is contained in:
30
docs/api/math/vector2/operator-sub.md
Normal file
30
docs/api/math/vector2/operator-sub.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Vector2::operator-
|
||||
|
||||
```cpp
|
||||
Vector2 operator-(const Vector2& other) const
|
||||
```
|
||||
|
||||
向量减法,将当前向量减去另一个向量。
|
||||
|
||||
**参数:**
|
||||
- `other` - 要减去的向量
|
||||
|
||||
**返回:** `Vector2` - 相减结果向量
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
Vector2 a(5.0f, 8.0f);
|
||||
Vector2 b(2.0f, 3.0f);
|
||||
Vector2 c = a - b; // (3.0f, 5.0f)
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Vector2 总览](vector2.md)
|
||||
- [`operator+`](operator-add.md) - 加法
|
||||
- [`operator-=`](operator-sub-assign.md) - 减法赋值
|
||||
Reference in New Issue
Block a user