Files
XCEngine/docs/api/math/quaternion/identity.md

29 lines
439 B
Markdown
Raw Normal View History

# Quaternion::Identity
```cpp
2026-03-20 02:35:15 +08:00
static Quaternion Identity();
```
2026-03-20 02:35:15 +08:00
返回单位四元数 (0, 0, 0, 1),表示无旋转。
2026-03-20 02:35:15 +08:00
**返回:** 单位四元数
**线程安全:** ✅
**复杂度:** O(1)
**示例:**
```cpp
2026-03-20 02:35:15 +08:00
#include <XCEngine/Math/Quaternion.h>
using namespace XCEngine::Math;
Quaternion identity = Quaternion::Identity();
2026-03-20 02:35:15 +08:00
// identity = (0, 0, 0, 1)
```
2026-03-20 02:35:15 +08:00
## 相关文档
- [Quaternion](quaternion.md) - 返回类总览