Files
XCEngine/docs/api/math/vector4/operator-eq.md
2026-03-20 02:35:15 +08:00

26 lines
509 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Vector4::operator==
```cpp
bool operator==(const Vector4& other) const
```
判断两个向量是否相等。
**参数:**
- `other` - 要比较的向量
**返回:** `bool` - 如果所有分量差的绝对值都小于 EPSILON 则返回 true否则返回 false
**示例:**
```cpp
Vector4 a(1.0f, 2.0f, 3.0f, 4.0f);
Vector4 b(1.0f, 2.0f, 3.0f, 4.0f);
bool eq = (a == b); // true
```
## 相关文档
- [Vector4 总览](vector4.md) - 返回类总览
- [operator!=](operator-ne.md) - 不等比较