docs: update math API docs
This commit is contained in:
@@ -1,17 +1,30 @@
|
||||
# Quaternion::Magnitude
|
||||
|
||||
```cpp
|
||||
float Magnitude() const
|
||||
float Magnitude() const;
|
||||
```
|
||||
|
||||
计算四元数的模长。
|
||||
计算四元数的模长(欧几里得范数)。
|
||||
|
||||
**返回:** `float` - 四元数的模长
|
||||
**返回:** 四元数的模长
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
float mag = quat.Magnitude();
|
||||
#include <XCEngine/Math/Quaternion.h>
|
||||
|
||||
using namespace XCEngine::Math;
|
||||
|
||||
Quaternion q = Quaternion::FromAxisAngle(Vector3::Up(), Math::Radians(90.0f));
|
||||
float mag = q.Magnitude();
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Quaternion](quaternion.md) - 返回类总览
|
||||
- [Normalized](normalized.md) - 返回归一化四元数
|
||||
- [Dot](dot.md) - 点积
|
||||
|
||||
Reference in New Issue
Block a user