docs: update math API docs
This commit is contained in:
@@ -1,17 +1,31 @@
|
||||
# Quaternion::Inverse
|
||||
|
||||
```cpp
|
||||
Quaternion Inverse() const
|
||||
Quaternion Inverse() const;
|
||||
```
|
||||
|
||||
返回四元数的逆(对于单位四元数就是共轭)。
|
||||
求四元数的逆。如果四元数已归一化,逆等于共轭。
|
||||
|
||||
**返回:** `Quaternion` - 逆四元数
|
||||
**返回:** 四元数的逆
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
Quaternion inv = quat.Inverse();
|
||||
#include <XCEngine/Math/Quaternion.h>
|
||||
|
||||
using namespace XCEngine::Math;
|
||||
|
||||
Quaternion q = Quaternion::FromAxisAngle(Vector3::Up(), Math::Radians(90.0f));
|
||||
Quaternion inv = q.Inverse();
|
||||
|
||||
Quaternion identity = q * inv;
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Quaternion](quaternion.md) - 返回类总览
|
||||
- [Normalized](normalized.md) - 归一化四元数
|
||||
|
||||
Reference in New Issue
Block a user