25 lines
390 B
Markdown
25 lines
390 B
Markdown
|
|
# Vector4::operator+
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
Vector4 operator+(const Vector4& other) const
|
||
|
|
```
|
||
|
|
|
||
|
|
向量加法。
|
||
|
|
|
||
|
|
**参数:**
|
||
|
|
- `other` - 要相加的向量
|
||
|
|
|
||
|
|
**返回:** `Vector4` - 相加结果向量
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
Vector4 a(1.0f, 2.0f, 3.0f, 4.0f);
|
||
|
|
Vector4 b(5.0f, 6.0f, 7.0f, 8.0f);
|
||
|
|
Vector4 c = a + b; // (6, 8, 10, 12)
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [Vector4 总览](vector4.md) - 返回类总览
|