docs: update math API docs
This commit is contained in:
32
docs/api/math/quaternion/normalize.md
Normal file
32
docs/api/math/quaternion/normalize.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Quaternion::Normalize
|
||||
|
||||
```cpp
|
||||
static Quaternion Normalize(const Quaternion& q);
|
||||
```
|
||||
|
||||
静态归一化方法,返回给定四元数的归一化副本。如果模长接近 0,返回单位四元数。
|
||||
|
||||
**参数:**
|
||||
- `q` - 要归一化的四元数
|
||||
|
||||
**返回:** 归一化后的四元数
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Math/Quaternion.h>
|
||||
|
||||
using namespace XCEngine::Math;
|
||||
|
||||
Quaternion q = Quaternion::FromAxisAngle(Vector3::Up(), Math::Radians(90.0f));
|
||||
Quaternion normalized = Quaternion::Normalize(q);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Quaternion](quaternion.md) - 返回类总览
|
||||
- [Normalized](normalized.md) - 实例归一化方法
|
||||
Reference in New Issue
Block a user